don't try to fetch previews when motion search dialog is open

This commit is contained in:
Josh Hawkins 2026-03-05 22:09:29 -06:00
parent 9f86558644
commit adbc4bd71c

View File

@ -131,12 +131,10 @@ export default function MotionSearchView({
); );
// Camera previews defer until dialog is closed // Camera previews defer until dialog is closed
const allPreviews = useCameraPreviews( const allPreviews = useCameraPreviews(timeRange, {
isSearchDialogOpen ? { after: 0, before: 0 } : timeRange, camera: selectedCamera ?? undefined,
{ fetchPreviews: !isSearchDialogOpen,
camera: selectedCamera ?? undefined, });
},
);
// ROI state // ROI state
const [polygonPoints, setPolygonPoints] = useState<number[][]>([]); const [polygonPoints, setPolygonPoints] = useState<number[][]>([]);