fix: accept boolean | undefined for CameraMotionDot autoLive prop

autoLive ?? globalAutoLive can be undefined when useUserPersistence
hasn't hydrated yet. Change the prop type to optional boolean and
treat undefined as the default-true value (show dot unless explicitly
set to false via no-streaming mode).

https://claude.ai/code/session_019B4dJXtcxvHn97ZaqHUB62
This commit is contained in:
Claude 2026-03-17 07:39:59 +00:00
parent f9885df0e4
commit 621f484b92
No known key found for this signature in database

View File

@ -1089,10 +1089,10 @@ function CameraMotionDot({
autoLive, autoLive,
}: { }: {
camera: CameraConfig; camera: CameraConfig;
autoLive: boolean; autoLive?: boolean;
}) { }) {
const { activeMotion, offline } = useCameraActivity(camera); const { activeMotion, offline } = useCameraActivity(camera);
if (!autoLive || offline || !activeMotion) return null; if (autoLive === false || offline || !activeMotion) return null;
return ( return (
<div className="absolute right-2 top-2 z-40"> <div className="absolute right-2 top-2 z-40">
<MdCircle className="mr-2 size-2 animate-pulse text-danger shadow-danger drop-shadow-md" /> <MdCircle className="mr-2 size-2 animate-pulse text-danger shadow-danger drop-shadow-md" />