From da2789c06c2fb2f953a2398faedc048c760a4309 Mon Sep 17 00:00:00 2001 From: Kipruto <43873157+kelvinkipruto@users.noreply.github.com> Date: Fri, 21 Feb 2025 18:05:34 +0300 Subject: [PATCH] Fix location navigation Signed-off-by: Kipruto <43873157+kelvinkipruto@users.noreply.github.com> --- apps/climatemappedafrica/src/components/ExplorePage/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/climatemappedafrica/src/components/ExplorePage/index.js b/apps/climatemappedafrica/src/components/ExplorePage/index.js index 3449e5482..c92939648 100644 --- a/apps/climatemappedafrica/src/components/ExplorePage/index.js +++ b/apps/climatemappedafrica/src/components/ExplorePage/index.js @@ -82,7 +82,7 @@ function ExplorePage({ if (geoCode) { dispatch({ type: "fetch", - payload: { code: geoCode, onClick: handleClickTag }, + payload: { code: geoCode }, }); } }, [dispatch, geoCode]); @@ -129,6 +129,8 @@ function ExplorePage({ }; const handleClickMap = (_, feature) => { + const code = feature?.properties?.code; + setGeoCode(code); return handleSelectLocation(feature.properties); };