diff options
author | Anton Tananaev <anton@traccar.org> | 2022-04-17 13:33:27 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-04-17 13:33:27 -0700 |
commit | 6505a13e0037d5de5737e940907cc62c4a9107bc (patch) | |
tree | c4b4ceeb0a8b4bd7b688ca4c6f1fd59834cc9f6f /modern/src/map/GeofenceMap.js | |
parent | e470eeb4fcc923bc54968a6561f66c75dab288b9 (diff) | |
download | trackermap-web-6505a13e0037d5de5737e940907cc62c4a9107bc.tar.gz trackermap-web-6505a13e0037d5de5737e940907cc62c4a9107bc.tar.bz2 trackermap-web-6505a13e0037d5de5737e940907cc62c4a9107bc.zip |
Refactor settings layout
Diffstat (limited to 'modern/src/map/GeofenceMap.js')
-rw-r--r-- | modern/src/map/GeofenceMap.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modern/src/map/GeofenceMap.js b/modern/src/map/GeofenceMap.js index c0ecef40..0d27df82 100644 --- a/modern/src/map/GeofenceMap.js +++ b/modern/src/map/GeofenceMap.js @@ -7,7 +7,7 @@ import { geofenceToFeature } from './mapUtil'; const GeofenceMap = () => { const id = 'geofences'; - const geofences = useSelector((state) => Object.values(state.geofences.items)); + const geofences = useSelector((state) => state.geofences.items); useEffect(() => { map.addSource(id, { @@ -74,7 +74,7 @@ const GeofenceMap = () => { useEffect(() => { map.getSource(id).setData({ type: 'FeatureCollection', - features: geofences.map(geofenceToFeature), + features: Object.values(geofences).map(geofenceToFeature), }); }, [geofences]); |