diff options
Diffstat (limited to 'modern/src/map/overlay/useMapOverlays.js')
-rw-r--r-- | modern/src/map/overlay/useMapOverlays.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modern/src/map/overlay/useMapOverlays.js b/modern/src/map/overlay/useMapOverlays.js index 5114424b..dafb5f83 100644 --- a/modern/src/map/overlay/useMapOverlays.js +++ b/modern/src/map/overlay/useMapOverlays.js @@ -1,3 +1,4 @@ +import { useMemo } from 'react'; import { useSelector } from 'react-redux'; import { useTranslation } from '../../common/components/LocalizationProvider'; import { useAttributePreference } from '../../common/util/preferences'; @@ -21,7 +22,7 @@ export default () => { const hereKey = useAttributePreference('hereKey'); const customMapOverlay = useSelector((state) => state.session.server.overlayUrl); - return [ + return useMemo(() => [ { id: 'openSeaMap', title: t('mapOpenSeaMap'), @@ -98,5 +99,5 @@ export default () => { source: sourceCustom(customMapOverlay), available: !!customMapOverlay, }, - ]; + ], [t, openWeatherKey, tomTomKey, hereKey, customMapOverlay]); }; |