aboutsummaryrefslogtreecommitdiff
path: root/modern/src/map
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-10-28 06:48:33 -0700
committerAnton Tananaev <anton@traccar.org>2022-10-28 06:48:33 -0700
commitef315b8e10329db80da1a97e96b3cc82481370ae (patch)
tree3a3e6366a98daf2e7c499422bdbcf94965917b28 /modern/src/map
parentc000fa00d3a4b71a814864b9c805885f85bdd8dc (diff)
downloadtrackermap-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.js4
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);