- added functionality to save sighting sessions to black board

This commit is contained in:
2025-10-27 08:28:44 +00:00
parent 9975e6a6ca
commit 18534ceb2c
5 changed files with 87 additions and 21 deletions

View File

@@ -0,0 +1,20 @@
import type { NPEDACTION, NPEDSTATE } from "../../types/types";
export const initialState = {
sessionStarted: false,
sessionList: [],
sessionPaused: false,
savedSightings: [],
};
export function reducer(state: NPEDSTATE, action: NPEDACTION) {
switch (action.type) {
case "SESSION":
return {
...state,
sessionStarted: action.payload,
};
default:
return { ...state };
}
}