import { SET_MAP_CONFIG } from '../disptch-types'; import Store from './../../utils/Store'; let config = null; const saveMapConfigLocalized = (msg) => { Store.saveJsonObject('mapConfig', msg) .then(res => { // console.log("saveAppConfigLocalized-s") }) .catch(e => { }) } const INITAL_STATE = config; export default function mapConfigReducer(state = INITAL_STATE, action: any) { switch (action.type) { case SET_MAP_CONFIG: saveMapConfigLocalized(action.config); return action.config; default: return state; } };