r- efactored reboots api to use useMutation for maintainability and readability.

- updated zoom debug
This commit is contained in:
2025-10-07 09:56:24 +01:00
parent a4e1e6e16f
commit b18d4272ec
5 changed files with 65 additions and 22 deletions

View File

@@ -36,10 +36,10 @@ const CameraSettingFields = ({
const parsed = parseRTSPUrl(initialData?.propURI?.value);
useEffect(() => {
if (!query.data) return;
if (!query?.data) return;
const apiZoom = getZoomLevel(query.data);
onZoomLevelChange?.(apiZoom);
}, [query.data, onZoomLevelChange]);
}, [query?.data, onZoomLevelChange]);
const getZoomLevel = (levelstring: string | undefined) => {
switch (levelstring) {