diff options
author | Anton Tananaev <anton@traccar.org> | 2022-10-28 06:48:33 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-10-28 06:48:33 -0700 |
commit | ef315b8e10329db80da1a97e96b3cc82481370ae (patch) | |
tree | 3a3e6366a98daf2e7c499422bdbcf94965917b28 /modern/src/map | |
parent | c000fa00d3a4b71a814864b9c805885f85bdd8dc (diff) | |
download | trackermap-web-ef315b8e10329db80da1a97e96b3cc82481370ae.tar.gz trackermap-web-ef315b8e10329db80da1a97e96b3cc82481370ae.tar.bz2 trackermap-web-ef315b8e10329db80da1a97e96b3cc82481370ae.zip |
Persist map geofences
Diffstat (limited to 'modern/src/map')
-rw-r--r-- | modern/src/map/MapGeofence.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modern/src/map/MapGeofence.js b/modern/src/map/MapGeofence.js index 3bfbca24..6208795c 100644 --- a/modern/src/map/MapGeofence.js +++ b/modern/src/map/MapGeofence.js @@ -3,14 +3,14 @@ import { useSelector } from 'react-redux'; import { useTheme } from '@mui/styles'; import { map } from './core/MapView'; import { findFonts, geofenceToFeature } from './core/mapUtil'; -import usePersistedState from '../common/util/usePersistedState'; +import { useAttributePreference } from '../common/util/preferences'; const MapGeofence = () => { const id = useId(); const theme = useTheme(); - const [mapGeofences] = usePersistedState('mapGeofences', true); + const mapGeofences = useAttributePreference('mapGeofences', true); const geofences = useSelector((state) => state.geofences.items); |