import { useCameraFeedContext } from "../../../../app/context/CameraFeedContext"; import type { DecodeReading } from "../../../../types/types"; import { useSightingEntryAndExit } from "../../hooks/useSightingEntryAndExit"; const SightingEntryTable = () => { const { state } = useCameraFeedContext(); const cameraFeedID = state.cameraFeedID; const { entryQuery } = useSightingEntryAndExit(cameraFeedID); const isLoading = entryQuery?.isFetching; const readings = entryQuery?.data?.decodes; if (isLoading) return Loading Sighting data…; return (
{/* Desktop Table */}
{readings?.map((reading: DecodeReading) => ( ))}
VRM Bay ID Seen Count First Seen Last Seen
{reading?.vrm} {reading?.laneID} {reading?.seenCount} {reading?.firstSeenTimeHumane} {reading?.lastSeenTimeHumane}
{/* Mobile Cards */}
{readings?.map((reading: DecodeReading) => (
{reading?.vrm} Bay {reading?.laneID}
Seen Count: {reading?.seenCount}
First Seen: {reading?.firstSeenTimeHumane}
Last Seen: {reading?.lastSeenTimeHumane}
))}
); }; export default SightingEntryTable;