Skip to content

Commit 9ccad0e

Browse files
fix Redux related issue
1 parent 71b8b59 commit 9ccad0e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

ui/src/store/index.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import { combineReducers, configureStore } from "@reduxjs/toolkit";
22
import { Provider } from "react-redux";
3-
import { persistStore, persistReducer } from 'redux-persist';
3+
import {
4+
persistReducer, persistStore,
5+
FLUSH, REHYDRATE, PAUSE, PERSIST, PURGE, REGISTER
6+
} from "redux-persist";
47
import storage from 'redux-persist/lib/storage'; // defaults to localStorage for web
58

69
// slices
@@ -50,6 +53,11 @@ const AppStore = ({ children, preloadedState = {}, returnStore = false }) => {
5053
const store = configureStore({
5154
reducer: persistedReducer,
5255
preloadedState: state,
56+
middleware: (getDefaultMiddleware) => getDefaultMiddleware({
57+
serializableCheck: {
58+
ignoredActions: [FLUSH, REHYDRATE, PAUSE, PERSIST, PURGE, REGISTER],
59+
}
60+
})
5361
});
5462
const persistor = persistStore(store);
5563

0 commit comments

Comments
 (0)