- added session sighting component

- add new session paused state and stop adding to session when true
This commit is contained in:
2025-10-24 12:10:10 +01:00
parent b58181e551
commit c83122cd52
6 changed files with 84 additions and 56 deletions

View File

@@ -71,7 +71,7 @@ export default function SightingHistoryWidget({ className, title }: SightingHist
} = useSightingFeedContext();
const { dispatch } = useAlertHitContext();
const { sessionStarted, setSessionList, sessionList } = useNPEDContext();
const { sessionStarted, setSessionList, sessionList, sessionPaused } = useNPEDContext();
const processedRefs = useRef<Set<number | string>>(new Set());
@@ -88,6 +88,7 @@ export default function SightingHistoryWidget({ className, title }: SightingHist
useEffect(() => {
if (sessionStarted) {
if (!mostRecent) return;
if (sessionPaused) return;
const reducedMostRecent = reduceObject(mostRecent);
setSessionList([...sessionList, reducedMostRecent]);
}