From f11f55d0ef4ffae970f8f4d29f2dbcef6fdcf76d Mon Sep 17 00:00:00 2001 From: Paul Bienkowski Date: Mon, 25 Jul 2022 17:56:34 +0200 Subject: [PATCH] Make sidebar toggle for Regions actually work --- frontend/src/pages/MapPage/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/MapPage/index.tsx b/frontend/src/pages/MapPage/index.tsx index f0baf7a..5304a79 100644 --- a/frontend/src/pages/MapPage/index.tsx +++ b/frontend/src/pages/MapPage/index.tsx @@ -220,7 +220,9 @@ export default function MapPage() { } const regionLayers = useMemo(() => getRegionLayers(), []); - layers.push(...regionLayers); + if (mapConfig.obsRegions.show) { + layers.push(...regionLayers); + } const eventsLayer = useMemo(() => getEventsLayer(), []); const eventsTextLayer = useMemo(() => getEventsTextLayer(), []);