added redux store for form elements

This commit is contained in:
2021-07-12 14:44:08 +01:00
parent c0fb7263d5
commit a555276c86
8 changed files with 162 additions and 131 deletions
+9 -1
View File
@@ -16,6 +16,7 @@ const combinedReducer = combineReducers({
searchResultsObj,
formData,
appealType,
form: formReducer,
});
const reducer = (state = { progress: "{}" }, action) => {
@@ -76,7 +77,14 @@ const makeStore = ({ isServer }) => {
const persistConfig = {
key: "nextjs",
whitelist: ["progress,search,searchResults,formData,appealType"],
whitelist: [
"progress",
"search",
"searchResults",
"formData",
"appealType",
"form",
],
storage,
stateReconciler: autoMergeLevel2, // if needed, use a safer storage
};