diff options
Diffstat (limited to 'modern/src/map/main/MapSelectedDevice.js')
-rw-r--r-- | modern/src/map/main/MapSelectedDevice.js | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/modern/src/map/main/MapSelectedDevice.js b/modern/src/map/main/MapSelectedDevice.js index c52b8df0..3f444409 100644 --- a/modern/src/map/main/MapSelectedDevice.js +++ b/modern/src/map/main/MapSelectedDevice.js @@ -4,7 +4,6 @@ import { useSelector } from 'react-redux'; import dimensions from '../../common/theme/dimensions'; import { map } from '../core/MapView'; import { usePrevious } from '../../reactHelper'; -import usePersistedState from '../../common/util/usePersistedState'; import { useAttributePreference } from '../../common/util/preferences'; const MapSelectedDevice = () => { @@ -12,11 +11,10 @@ const MapSelectedDevice = () => { const previousDeviceId = usePrevious(selectedDeviceId); const selectZoom = useAttributePreference('web.selectZoom', 10); + const mapFollow = useAttributePreference('mapFollow', false); const position = useSelector((state) => state.positions.items[selectedDeviceId]); - const [mapFollow] = usePersistedState('mapFollow', false); - useEffect(() => { if ((selectedDeviceId !== previousDeviceId || mapFollow) && position) { map.easeTo({ |