- added hotlists being displayed
- functionality to delete hotlist
This commit is contained in:
@@ -12,6 +12,7 @@ export const initialState = {
|
||||
catC: true,
|
||||
catD: false,
|
||||
},
|
||||
hotlistFiles: [],
|
||||
};
|
||||
|
||||
export function reducer(state: NPEDSTATE, action: NPEDACTION) {
|
||||
@@ -56,6 +57,17 @@ export function reducer(state: NPEDSTATE, action: NPEDACTION) {
|
||||
...state,
|
||||
iscatEnabled: action.payload,
|
||||
};
|
||||
|
||||
case "SETHOTLISTS":
|
||||
return {
|
||||
...state,
|
||||
hotlistFiles: action.payload,
|
||||
};
|
||||
case "DELETEHOTLIST":
|
||||
return {
|
||||
...state,
|
||||
hotlistFiles: state.hotlistFiles.filter((hotlist) => hotlist.filename !== action.payload),
|
||||
};
|
||||
default:
|
||||
return { ...state };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user