diff --git a/client/src/components/mapboxMap.module.scss b/client/src/components/mapboxMap.module.scss index c7fcb227..8f7ef12b 100644 --- a/client/src/components/mapboxMap.module.scss +++ b/client/src/components/mapboxMap.module.scss @@ -1,3 +1,6 @@ +$sidebar-background: rgba(35, 55, 75, 0.9); +$sidebar-color: #ffffff; + .mapContainer { height: 676px; margin-bottom: 29px; @@ -6,8 +9,8 @@ } .sidebar { - background-color: rgba(35, 55, 75, 0.9); - color: #ffffff; + background-color: $sidebar-background; + color: $sidebar-color; padding: 6px 12px; font-family: monospace; z-index: 1; diff --git a/client/src/components/openlayersMap.tsx b/client/src/components/openlayersMap.tsx index e9ab2fa9..06079dd5 100644 --- a/client/src/components/openlayersMap.tsx +++ b/client/src/components/openlayersMap.tsx @@ -76,7 +76,7 @@ const MapWrapper = ({features}: IMapWrapperProps) => { }), ); const extent = featuresLayer?.getSource().getExtent(); - if (extent != null) { + if (extent) { // fit map to feature extent (with 100px of padding) map?.getView().fit(extent, { padding: [100, 100, 100, 100],