From a3982eddae18ae09e4666bf7fac0597215eaa81b Mon Sep 17 00:00:00 2001 From: Fedor Katurov Date: Tue, 20 Apr 2021 18:01:28 +0700 Subject: [PATCH] fixed provider and logo persistence --- src/redux/store.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/redux/store.ts b/src/redux/store.ts index f3919fb..19369b5 100644 --- a/src/redux/store.ts +++ b/src/redux/store.ts @@ -25,6 +25,12 @@ import { assocPath } from 'ramda'; import { AxiosError } from 'axios'; import { api } from '~/utils/api/instance'; +const mapPersistConfig: PersistConfig = { + key: 'map', + whitelist: ['logo', 'provider'], + storage, +}; + const userPersistConfig: PersistConfig = { key: 'user', whitelist: ['user', 'logo', 'provider', 'speed'], @@ -55,7 +61,7 @@ export const store = createStore( combineReducers({ user: persistReducer(userPersistConfig, userReducer), editor: persistReducer(editorPersistConfig, editor), - map, + map: persistReducer(mapPersistConfig, map), }), composeEnhancers(applyMiddleware(sagaMiddleware)) );