Skip to content

NVR with realtime local object detection for IP cameras

Ensure alertVideos persistence is loaded before displaying thumb or preview (#19432)

Josh Hawkins21ab164bfec0
diff --git a/web/src/components/card/AnimatedEventCard.tsx b/web/src/components/card/AnimatedEventCard.tsx
index d46509eb62..a048046411 100644
--- a/web/src/components/card/AnimatedEventCard.tsx
+++ b/web/src/components/card/AnimatedEventCard.tsx
@@ -91,7 +91,10 @@ export function AnimatedEventCard({
// image behavior
- const [alertVideos] = usePersistence("alertVideos", true);
+ const [alertVideos, _, alertVideosLoaded] = usePersistence(
+ "alertVideos",
+ true,
+ );
const aspectRatio = useMemo(() => {
if (
@@ -135,7 +138,7 @@ export function AnimatedEventCard({
<TooltipContent>{t("markAsReviewed")}</TooltipContent>
</Tooltip>
)}
- {previews != undefined && (
+ {previews != undefined && alertVideosLoaded && (
<div
className="size-full cursor-pointer"
onClick={onOpenReview}