- added hotlists being displayed

- functionality to delete hotlist
This commit is contained in:
2025-11-19 13:55:21 +00:00
parent ea93053dd3
commit 0b3dcbb265
7 changed files with 126 additions and 0 deletions

View File

@@ -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 };
}