import * as actions from "@nteract/actions" ; import { makeModalsRecord } from "@nteract/types" ; import { Action , Reducer } from "redux" ; import { combineReducers } from "redux-immutable" ; export const modalType = ( state = "" , action ) : string => { switch ( action . type ) { case actions . OPEN_MODAL : return action . payload . modalType ; case actions . CLOSE_MODAL : return "" ; default : return state ; } } ; export const modals = combineReducers ( { modalType } , makeModalsRecord as any ) ;