- added session sighting component
- add new session paused state and stop adding to session when true
This commit is contained in:
@@ -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]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user