Docker -> use old storage statements

feature/2_forms
TBS093A 2021-05-17 21:32:22 +02:00
parent 1ba3a8117b
commit 87c9ec632d
1 changed files with 17 additions and 27 deletions

View File

@ -10,14 +10,9 @@ import { userAuthReducer } from './slices/userAuthSlice'
import { userCrudReducer } from './slices/userCrudSlice'
let persistedState = null
let persistedState = loadState()
if (typeof window !== `undefined`) {
persistedState = loadState()
}
export const store = typeof window !== `undefined`
? configureStore({
export const store = configureStore({
reducer: {
modelCrudReducer,
renderCrudReducer,
@ -27,9 +22,6 @@ export const store = typeof window !== `undefined`
},
preloadedState: persistedState
})
: 0
if (typeof window !== `undefined`) {
store.subscribe(() => {
saveState(store.getState());
@ -38,5 +30,3 @@ if (typeof window !== `undefined`) {
store.subscribe(lodash.throttle(() => {
saveState(store.getState())
}, 100))
}