- refactored state for sessionlist, and session active and pause states
This commit is contained in:
@@ -25,6 +25,21 @@ export function reducer(state: NPEDSTATE, action: NPEDACTION) {
|
||||
...state,
|
||||
npedUser: action.payload,
|
||||
};
|
||||
case "SESSIONPAUSE":
|
||||
return {
|
||||
...state,
|
||||
sessionPaused: action.payload,
|
||||
};
|
||||
case "ADD":
|
||||
return {
|
||||
...state,
|
||||
sessionList: [...state.sessionList, action.payload],
|
||||
};
|
||||
case "UPDATE":
|
||||
return {
|
||||
...state,
|
||||
sessionList: action.payload,
|
||||
};
|
||||
default:
|
||||
return { ...state };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user