- updated state for tracking sessions

- removed un used state in sighting feed

- added groupings depending on sightings
This commit is contained in:
2025-10-08 15:46:54 +01:00
parent 4e2d3c47c0
commit 17a4a6de8d
7 changed files with 82 additions and 24 deletions

View File

@@ -1,5 +1,5 @@
import { useState, type ReactNode } from "react";
import type { NPEDUser, SightingType } from "../../types/types";
import type { NPEDUser, ReducedSightingType } from "../../types/types";
import { NPEDUserContext } from "../NPEDUserContext";
type NPEDUserProviderType = {
@@ -9,7 +9,7 @@ type NPEDUserProviderType = {
export const NPEDUserProvider = ({ children }: NPEDUserProviderType) => {
const [user, setUser] = useState<NPEDUser | null>(null);
const [sessionStarted, setSessionStarted] = useState(false);
const [sessionList, setSessionList] = useState<SightingType[]>([]);
const [sessionList, setSessionList] = useState<ReducedSightingType[]>([]);
return (
<NPEDUserContext.Provider