import { AnyAction } from "redux" ; import { uiActions } from "../actionCreators/ui" ; import { Map } from "immutable" ; export function ui ( state = Map < string , any > ( ) , action ) { switch ( action . type ) { case uiActions . ADD_OR_UPDATE_UI_STATE : return state . set ( action . key , action . value ) ; default : return state ; } } export function web3AuthType ( state = "" , action ) { switch ( action . type ) { case uiActions . HIDE_WEB3_AUTH_MODAL : return "" ; case uiActions . SET_WEB3_AUTH_TYPE : return action . value ; default : return state ; } } export function showWeb3AuthModal ( state = false , action ) { switch ( action . type ) { case uiActions . SHOW_WEB3_AUTH_MODAL : return true ; case uiActions . HIDE_WEB3_AUTH_MODAL : return false ; default : return state ; } }