Savepoint
This commit is contained in:
parent
7db1a3456b
commit
02c483950c
45 changed files with 5136 additions and 256 deletions
|
@ -5,9 +5,18 @@ const ACTIONS = {
|
|||
UPDATE: "u",
|
||||
};
|
||||
|
||||
const initialState = {};
|
||||
const initialState = {
|
||||
intervals: [],
|
||||
failing: [],
|
||||
regions: [],
|
||||
focusJob: false,
|
||||
simplifiedControls: false,
|
||||
defaultRegion: "us", // Local Store
|
||||
defaultPage: "failing", // Local Store
|
||||
};
|
||||
|
||||
const reducer = (state, action) => {
|
||||
const { store } = action;
|
||||
// Actions
|
||||
switch (action.type) {
|
||||
case ACTIONS.UPDATE:
|
||||
|
@ -23,7 +32,7 @@ export const StoreProvider = ({ children }) => {
|
|||
const context = {
|
||||
state,
|
||||
dispatch,
|
||||
updateStore: (store) => dispatch(state, { type: ACTIONS.UPDATE, store }),
|
||||
updateStore: (store) => dispatch({ type: ACTIONS.UPDATE, store }),
|
||||
};
|
||||
const contextValue = useMemo(() => context, [state, dispatch]);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue