diff --git a/frontend/src/pages/MapPage/index.tsx b/frontend/src/pages/MapPage/index.tsx index 0c0ce78..af2f638 100644 --- a/frontend/src/pages/MapPage/index.tsx +++ b/frontend/src/pages/MapPage/index.tsx @@ -120,7 +120,11 @@ function MapPage({ login }) { (e) => { let node = e.target; while (node) { - if (node?.classList?.contains(styles.mapInfoBox)) { + if ( + [styles.mapInfoBox, styles.mapToolbar].some((className) => + node?.classList?.contains(className) + ) + ) { return; } node = node.parentNode; @@ -162,6 +166,16 @@ function MapPage({ login }) { layers.push(eventsTextLayer); } + const onToggleLayerSidebarButtonClick = useCallback( + (e) => { + e.stopPropagation(); + e.preventDefault(); + console.log("toggl;e"); + setLayerSidebar((v) => !v); + }, + [setLayerSidebar] + ); + if (!obsMapSource) { return null; } @@ -212,17 +226,14 @@ function MapPage({ login }) { )}