aboutsummaryrefslogtreecommitdiff
path: root/modern/src/map/overlay/MapOverlay.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/map/overlay/MapOverlay.js')
-rw-r--r--modern/src/map/overlay/MapOverlay.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/modern/src/map/overlay/MapOverlay.js b/modern/src/map/overlay/MapOverlay.js
index 85797d4b..4db2153d 100644
--- a/modern/src/map/overlay/MapOverlay.js
+++ b/modern/src/map/overlay/MapOverlay.js
@@ -1,5 +1,5 @@
import { useId, useEffect } from 'react';
-import usePersistedState from '../../common/util/usePersistedState';
+import { useAttributePreference } from '../../common/util/preferences';
import { map } from '../core/MapView';
import useMapOverlays from './useMapOverlays';
@@ -7,7 +7,7 @@ const MapOverlay = () => {
const id = useId();
const mapOverlays = useMapOverlays();
- const [selectedMapOverlay] = usePersistedState('selectedMapOverlay');
+ const selectedMapOverlay = useAttributePreference('selectedMapOverlay');
const activeOverlay = mapOverlays.filter((overlay) => overlay.available).find((overlay) => overlay.id === selectedMapOverlay);