NVR with realtime local object detection for IP cameras
TypeScript aicameragoogle-coralhome-assistanthome-automationhomeautomationmqttnvrobject-detectionrealtimertsptensorflow
Make sure camera is always set in settings (#11812)
Josh Hawkinse1bedf30bf86
diff --git a/web/src/pages/Settings.tsx b/web/src/pages/Settings.tsxindex f6e6e1aaee..7d501d23e4 100644--- a/web/src/pages/Settings.tsx+++ b/web/src/pages/Settings.tsx@@ -81,12 +81,10 @@ export default function Settings() {);useEffect(() => {- if (cameras.length) {+ if (cameras.length > 0 && selectedCamera === "") {setSelectedCamera(cameras[0].name);}- // only run once- // eslint-disable-next-line react-hooks/exhaustive-deps- }, []);+ }, [cameras, selectedCamera]);useEffect(() => {if (tabsRef.current) {