From 78dcbee4224c4fcd6e9a672d8a6785b9c995c1f1 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 10 Oct 2024 22:55:40 -0700 Subject: [PATCH] Fix lint issues --- src/map/core/mapUtil.js | 2 +- src/map/draw/MapGeofenceEdit.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/map/core/mapUtil.js b/src/map/core/mapUtil.js index f7e6ec1053..d3389df3ed 100644 --- a/src/map/core/mapUtil.js +++ b/src/map/core/mapUtil.js @@ -87,7 +87,7 @@ export const geofenceToFeature = (theme, item) => { export const geometryToArea = (geometry) => stringify(reverseCoordinates(geometry)); export const findFonts = (map) => { - const glyphs = map.getStyle().glyphs; + const { glyphs } = map.getStyle(); if (glyphs.startsWith('https://tiles.openfreemap.org')) { return ['Noto Sans Regular']; } diff --git a/src/map/draw/MapGeofenceEdit.js b/src/map/draw/MapGeofenceEdit.js index 91da64cf90..d2824fd608 100644 --- a/src/map/draw/MapGeofenceEdit.js +++ b/src/map/draw/MapGeofenceEdit.js @@ -11,7 +11,7 @@ import { map } from '../core/MapView'; import { findFonts, geofenceToFeature, geometryToArea } from '../core/mapUtil'; import { errorsActions, geofencesActions } from '../../store'; import { useCatchCallback } from '../../reactHelper'; -import theme from './theme'; +import drawTheme from './theme'; import { useTranslation } from '../../common/components/LocalizationProvider'; MapboxDraw.constants.classes.CONTROL_BASE = 'maplibregl-ctrl'; @@ -32,7 +32,7 @@ const MapGeofenceEdit = ({ selectedGeofenceId }) => { trash: true, }, userProperties: true, - styles: [...theme, { + styles: [...drawTheme, { id: 'gl-draw-title', type: 'symbol', filter: ['all'], @@ -47,7 +47,7 @@ const MapGeofenceEdit = ({ selectedGeofenceId }) => { }, }], }), []); - + const geofences = useSelector((state) => state.geofences.items); const refreshGeofences = useCatchCallback(async () => {