Skip to content

Commit

Permalink
Merge pull request #374 from Open-Earth-Foundation/fix/redux-persist-…
Browse files Browse the repository at this point in the history
…state

fix(ui): blacklisted api reducer from being persisted
  • Loading branch information
lemilonkh authored Mar 13, 2024
2 parents c66692c + fda8341 commit db10083
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions app/src/lib/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ import {
} from "redux-persist";
import storage from "redux-persist/lib/storage";

const persistConfig = {
key: "root",
version: 1,
storage,
};

const reducer = combineReducers({
inventoryData: inventoryDataReducer,
[api.reducerPath]: api.reducer,
Expand All @@ -33,6 +27,13 @@ const reducer = combineReducers({
openClimateCityData: openclimateCityDataReducer,
});

const persistConfig = {
key: "root",
version: 1,
storage,
blacklist: ["api"],
};

const persistedReducer = persistReducer(persistConfig, reducer);

export const store = configureStore({
Expand Down

0 comments on commit db10083

Please sign in to comment.