NVR with realtime local object detection for IP cameras
TypeScript aicameragoogle-coralhome-assistanthome-automationhomeautomationmqttnvrobject-detectionrealtimertsptensorflow
Fixes for ongoing events (#8208)
Nicolas Mowenefbc094bbc2d
diff --git a/web/src/routes/Events.jsx b/web/src/routes/Events.jsxindex 55ab44f952..df3416cc8c 100644--- a/web/src/routes/Events.jsx+++ b/web/src/routes/Events.jsx@@ -94,7 +94,7 @@ export default function Events({ path, ...props }) {showDeleteFavorite: false,});- const [showInProgress, setShowInProgress] = useState(true);+ const [showInProgress, setShowInProgress] = useState((props.event || props.cameras || props.labels) == null);const eventsFetcher = useCallback((path, params) => {@@ -121,8 +121,12 @@ export default function Events({ path, ...props }) {[searchParams]);- const { data: ongoingEvents } = useSWR(['events', { in_progress: 1, include_thumbnails: 0 }]);- const { data: eventPages, mutate, size, setSize, isValidating } = useSWRInfinite(getKey, eventsFetcher);+ const { data: ongoingEvents, mutate: refreshOngoingEvents } = useSWR(['events', { in_progress: 1, include_thumbnails: 0 }]);+ const { data: eventPages, mutate: refreshEvents, size, setSize, isValidating } = useSWRInfinite(getKey, eventsFetcher);+ const mutate = () => {+ refreshEvents();+ refreshOngoingEvents();+ }const { data: allLabels } = useSWR(['labels']);const { data: allSubLabels } = useSWR(['sub_labels', { split_joined: 1 }]);