* fix

* Fix

* Fix incorrect default websocket value

* Cleanup value setting
This commit is contained in:
Nicolas Mowen
2025-03-03 16:28:34 -07:00
committed by GitHub
parent 2946c935ee
commit 56079d080d
4 changed files with 12 additions and 11 deletions

View File

@@ -16,7 +16,7 @@ import useSWR from "swr";
import { getAttributeLabels } from "@/utils/iconUtil";
type useCameraActivityReturn = {
enabled: boolean;
enabled?: boolean;
activeTracking: boolean;
activeMotion: boolean;
objects: ObjectType[];
@@ -148,7 +148,7 @@ export function useCameraActivity(
return cameras[camera.name].camera_fps == 0 && stats["service"].uptime > 60;
}, [camera, stats]);
const isCameraEnabled = cameraEnabled === "ON";
const isCameraEnabled = cameraEnabled ? cameraEnabled === "ON" : undefined;
return {
enabled: isCameraEnabled,