Merged PR 2665: 25470 testing authentication handler
Related work items: #25470
This commit is contained in:
+15
-15
@@ -31,7 +31,7 @@ const appReducer = combineReducers({
|
||||
myCases,
|
||||
myRepresentations,
|
||||
watchedCases,
|
||||
form: formReducer,
|
||||
form: formReducer
|
||||
});
|
||||
|
||||
const combinedReducer = (state, action) => {
|
||||
@@ -53,28 +53,28 @@ const reducer = (state = {}, action) => {
|
||||
...state,
|
||||
server: {
|
||||
...state.server,
|
||||
progress: action.payload,
|
||||
},
|
||||
progress: action.payload
|
||||
}
|
||||
};
|
||||
case "CLIENT_ACTION":
|
||||
return {
|
||||
...state,
|
||||
client: {
|
||||
...state.client,
|
||||
progress: action.payload,
|
||||
},
|
||||
progress: action.payload
|
||||
}
|
||||
};
|
||||
case "GET_ITEMS":
|
||||
return {
|
||||
...state,
|
||||
items: action.payload,
|
||||
loading: false,
|
||||
loading: false
|
||||
};
|
||||
case "SET_ITEMS":
|
||||
return {
|
||||
...state,
|
||||
items: action.payload,
|
||||
loading: false,
|
||||
loading: false
|
||||
};
|
||||
default:
|
||||
return combinedReducer(state, action);
|
||||
@@ -84,7 +84,7 @@ const reducer = (state = {}, action) => {
|
||||
const migrations = {
|
||||
1: (state) => {
|
||||
return {
|
||||
...state,
|
||||
...state
|
||||
};
|
||||
},
|
||||
2: (state) => {
|
||||
@@ -93,12 +93,12 @@ const migrations = {
|
||||
const newStateObj = {
|
||||
...state,
|
||||
"currentView": {},
|
||||
"searchResultsObj": {},
|
||||
"searchResultsObj": {}
|
||||
};
|
||||
|
||||
console.info("v2 schema migration:" + JSON.stringify(newStateObj));
|
||||
return newStateObj;
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
// BINDING MIDDLEWARE
|
||||
@@ -119,7 +119,7 @@ const makeStore = ({ isServer }) => {
|
||||
const {
|
||||
persistStore,
|
||||
persistReducer,
|
||||
createMigrate,
|
||||
createMigrate
|
||||
} = require("redux-persist");
|
||||
const storage = require("redux-persist/lib/storage").default;
|
||||
|
||||
@@ -132,15 +132,15 @@ const makeStore = ({ isServer }) => {
|
||||
"LPAData",
|
||||
"accountDetails",
|
||||
"awaitingSubmission",
|
||||
"myCases",
|
||||
// "myCases",
|
||||
"myRepresentations",
|
||||
"watchedCases",
|
||||
"form",
|
||||
"form"
|
||||
],
|
||||
version: process.env.BUILD_ID_ENV,
|
||||
storage: storage,
|
||||
stateReconciler: autoMergeLevel2, // if needed, use a safer storage
|
||||
migrate: createMigrate(migrations, { debug: true }),
|
||||
migrate: createMigrate(migrations, { debug: true })
|
||||
};
|
||||
|
||||
const persistedReducer = persistReducer(persistConfig, reducer); // Create a new reducer with our existing reducer
|
||||
@@ -157,7 +157,7 @@ const makeStore = ({ isServer }) => {
|
||||
};
|
||||
export const setClientState = (clientState) => ({
|
||||
type: SET_CLIENT_STATE,
|
||||
payload: clientState,
|
||||
payload: clientState
|
||||
});
|
||||
// Export the wrapper & wrap the pages/_app.js with this wrapper only
|
||||
export const wrapper = createWrapper(makeStore);
|
||||
|
||||
Reference in New Issue
Block a user