From 41596bbb56c42b88c27dd6f2b0618fff5e187582 Mon Sep 17 00:00:00 2001 From: Tyrel Narciso Date: Tue, 30 Apr 2024 14:23:46 -0700 Subject: [PATCH] DBC22-2052: reset cam index to clear state --- src/frontend/src/Components/map/camPopup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/src/Components/map/camPopup.js b/src/frontend/src/Components/map/camPopup.js index ded2881cf..99020ba02 100644 --- a/src/frontend/src/Components/map/camPopup.js +++ b/src/frontend/src/Components/map/camPopup.js @@ -37,6 +37,7 @@ export default function CamPopup(props) { const newCam = camFeature.id ? camFeature : camFeature.getProperties(); setRootCam(newCam); setCamera(newCam); + setCamIndex(0); }, [camFeature]); useEffect(() => { @@ -44,7 +45,6 @@ export default function CamPopup(props) { isInitialMount.current = false; return; } - setCamera(rootCam.camGroup[camIndex]); }, [camIndex]);