Fix websocket enabled state (#17585)

* use camera activity hook instead of websocket enabled state

* use original websocket but use ternary operator instead
This commit is contained in:
Josh Hawkins 2025-04-07 12:24:53 -05:00 committed by GitHub
parent f978ef2cda
commit f2840468b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -28,7 +28,7 @@ export default function CameraImage({
const { name } = config ? config.cameras[camera] : "";
const { payload: enabledState } = useEnabledState(camera);
const enabled = enabledState === "ON" || enabledState === undefined;
const enabled = enabledState ? enabledState === "ON" : true;
const [{ width: containerWidth, height: containerHeight }] =
useResizeObserver(containerRef);