diff --git a/src/Components/Map/Subcomponents/Controls/LayerControl.tsx b/src/Components/Map/Subcomponents/Controls/LayerControl.tsx index 523d3744..6c7c89f8 100644 --- a/src/Components/Map/Subcomponents/Controls/LayerControl.tsx +++ b/src/Components/Map/Subcomponents/Controls/LayerControl.tsx @@ -14,7 +14,6 @@ export function LayerControl() { layers.map(layer => addVisibleLayer(layer) ) - }, [layers]) const isLayerVisible = useIsLayerVisible(); @@ -22,26 +21,24 @@ export function LayerControl() { const addVisibleLayer = useAddVisibleLayer(); return ( -
e.stopPropagation()}> +
{ open ? -
e.stopPropagation()}> -