From e452f360f989f0daa3ee3853c0f5d19474664055 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 13 Dec 2025 02:16:44 -0500 Subject: [PATCH] update frontend --- src/components/Map/useMapCore.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/components/Map/useMapCore.js b/src/components/Map/useMapCore.js index 0ccd14a..d0b71b8 100644 --- a/src/components/Map/useMapCore.js +++ b/src/components/Map/useMapCore.js @@ -98,6 +98,15 @@ export function useMapCore(theme) { map.addControl(new maplibregl.NavigationControl(), "top-right"); mapRef.current = map; + // Close expanded post when clicking on the map (outside markers) + map.on("click", () => { + const el = expandedElRef.current; + if (el && el.__renderCompact) { + el.__renderCompact(); + expandedElRef.current = null; + } + }); + map.on("load", () => { const vp = getViewFromMap(map); setViewParams(vp);