Only show recordings summary for main camera in history view (#20344)
CI / AMD64 Build (push) Has been cancelled
CI / ARM Build (push) Has been cancelled
CI / Jetson Jetpack 6 (push) Has been cancelled
CI / AMD64 Extra Build (push) Has been cancelled
CI / ARM Extra Build (push) Has been cancelled
CI / Synaptics Build (push) Has been cancelled
CI / Assemble and push default build (push) Has been cancelled

This commit is contained in:
Josh Hawkins
2025-10-03 09:04:45 -06:00
committed by GitHub
parent 658b0a064c
commit 4bea69591b
+2 -2
View File
@@ -103,18 +103,18 @@ export function RecordingView({
() => allCameras.filter((camera) => allowedCameras.includes(camera)),
[allCameras, allowedCameras],
);
const [mainCamera, setMainCamera] = useState(startCamera);
const { data: recordingsSummary } = useSWR<RecordingsSummary>([
"recordings/summary",
{
timezone: timezone,
cameras: effectiveCameras.join(",") ?? null,
cameras: mainCamera ?? null,
},
]);
// controller state
const [mainCamera, setMainCamera] = useState(startCamera);
const mainControllerRef = useRef<DynamicVideoController | null>(null);
const mainLayoutRef = useRef<HTMLDivElement | null>(null);
const cameraLayoutRef = useRef<HTMLDivElement | null>(null);