export type comMapState = { comMap: { isFeatured:any isModal:boolean }; }; type comMapActions = { selectFeature:(feature:any)=>void, chModalOpen:(open:boolean) => void, }; export type comMapType = comMapState & comMapActions; export const comMapStateExport: comMapState = { comMap: { isFeatured:{}, isModal:false }, }; export const commonMapActionsExport: (set: any) => comMapActions = ( set: any ) => { return { selectFeature:(feature:any) => { try { set((state: comMapState) => { return { ...state, comMap: { ...state.comMap, isFeatured:feature }, }; }); } catch (e) { console.log(e) } },chModalOpen:(open:boolean) =>{ try { set((state: comMapState) => { return { ...state, comMap: { ...state.comMap, isModal:open }, }; }); } catch (e) { console.log(e) } } } }