- sesstions start by default

- added restart session button
This commit is contained in:
2025-11-19 11:52:37 +00:00
parent 516b43a2f8
commit ea93053dd3
3 changed files with 40 additions and 21 deletions

View File

@@ -1,7 +1,7 @@
import type { NPEDACTION, NPEDSTATE } from "../../types/types";
export const initialState = {
sessionStarted: false,
sessionStarted: true,
sessionList: [],
sessionPaused: false,
savedSightings: [],
@@ -36,6 +36,11 @@ export function reducer(state: NPEDSTATE, action: NPEDACTION) {
...state,
sessionPaused: action.payload,
};
case "SESSIONRESTART":
return {
...state,
sessionList: action.payload,
};
case "ADD":
return {
...state,