aboutsummaryrefslogtreecommitdiff
path: root/modern/src/main/MainPage.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/main/MainPage.js')
-rw-r--r--modern/src/main/MainPage.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/modern/src/main/MainPage.js b/modern/src/main/MainPage.js
index 9a21d570..0655fa92 100644
--- a/modern/src/main/MainPage.js
+++ b/modern/src/main/MainPage.js
@@ -15,6 +15,7 @@ import EventsDrawer from './EventsDrawer';
import useFilter from './useFilter';
import MainToolbar from './MainToolbar';
import MainMap from './MainMap';
+import { useAttributePreference } from '../common/util/preferences';
const useStyles = makeStyles((theme) => ({
root: {
@@ -63,7 +64,7 @@ const MainPage = () => {
const desktop = useMediaQuery(theme.breakpoints.up('md'));
- const [mapOnSelect] = usePersistedState('mapOnSelect', true);
+ const mapOnSelect = useAttributePreference('mapOnSelect', true);
const selectedDeviceId = useSelector((state) => state.devices.selectedId);
const positions = useSelector((state) => state.positions.items);