Store: clear cache and sync items on logout.

master
Tom Hacohen 4 years ago
parent 40c3a1f114
commit abf2224d31

@ -110,6 +110,9 @@ export const collections = handleActions(
} }
return state; return state;
}, },
[actions.logout.toString()]: (state: CacheCollectionsData, _action: any) => {
return state.clear();
},
}, },
ImmutableMap({}) ImmutableMap({})
); );
@ -162,6 +165,9 @@ export const items = handleActions(
} }
return state; return state;
}, },
[actions.logout.toString()]: (state: CacheItemsData, _action: any) => {
return state.clear();
},
}, },
ImmutableMap({}) ImmutableMap({})
); );

Loading…
Cancel
Save