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
const allPreviews = useCameraPreviews(
isSearchDialogOpen ? { after: 0, before: 0 } : timeRange,
{
camera: selectedCamera ?? undefined,
},
);
const allPreviews = useCameraPreviews(timeRange, {
camera: selectedCamera ?? undefined,
fetchPreviews: !isSearchDialogOpen,
});
// ROI state
const [polygonPoints, setPolygonPoints] = useState<number[][]>([]);