diff --git a/web/src/Camera.jsx b/web/src/Camera.jsx index 8d773cd3f..9136dbd37 100644 --- a/web/src/Camera.jsx +++ b/web/src/Camera.jsx @@ -1,4 +1,5 @@ import { h } from 'preact'; +import AutoUpdatingCameraImage from './components/AutoUpdatingCameraImage'; import Box from './components/Box'; import Heading from './components/Heading'; import Link from './components/Link'; @@ -36,12 +37,7 @@ export default function Camera({ camera, url }) {
{camera} - + diff --git a/web/src/CameraMap.jsx b/web/src/CameraMap.jsx index fce285481..b84a8137c 100644 --- a/web/src/CameraMap.jsx +++ b/web/src/CameraMap.jsx @@ -213,7 +213,7 @@ ${Object.keys(objectMaskPoints) ); return ( -
+
{camera} mask & zone creator @@ -226,7 +226,7 @@ ${Object.keys(objectMaskPoints)
- + { + const timeoutId = setTimeout(() => { + setKey(Date.now()); + }, 500); + return () => { + clearTimeout(timeoutId); + }; + }, [key, searchParams]); + + return ( + {`Auto-updating + ); +}