diff --git a/apps/photos/src/components/PhotoViewer/FileInfo/MapBox.tsx b/apps/photos/src/components/PhotoViewer/FileInfo/MapBox.tsx index 76073492f..7f1916e0c 100644 --- a/apps/photos/src/components/PhotoViewer/FileInfo/MapBox.tsx +++ b/apps/photos/src/components/PhotoViewer/FileInfo/MapBox.tsx @@ -1,7 +1,6 @@ import { useEffect, useRef } from 'react'; -import { styled } from '@mui/material'; +import { Typography, styled } from '@mui/material'; import { runningInBrowser } from 'utils/common'; -import { MapButton } from './MapButton'; import 'leaflet/dist/leaflet.css'; import 'leaflet-defaulticon-compatibility/dist/leaflet-defaulticon-compatibility.webpack.css'; // Re-uses images from ~leaflet package @@ -20,15 +19,6 @@ const MapBoxContainer = styled('div')` height: 200px; width: 100%; `; -const MapBoxEnableContainer = styled('div')` - position: relative; - height: 200px; - width: 100%; - display: flex; - justify-content: center; - align-items: center; - background-color: rgba(255, 255, 255, 0.09); -`; interface MapBoxProps { location: { latitude: number; longitude: number }; @@ -58,14 +48,9 @@ const MapBox: React.FC = ({ location, showMap }) => { return ( <> - {showMap && } - {!showMap && ( - <> - - {t('ENABLE_MAP')} - - - )} + + {showMap && {t('ENABLE_MAP')}} + ); }; diff --git a/apps/photos/src/components/PhotoViewer/FileInfo/index.tsx b/apps/photos/src/components/PhotoViewer/FileInfo/index.tsx index 2f9bfc6e3..4f688897d 100644 --- a/apps/photos/src/components/PhotoViewer/FileInfo/index.tsx +++ b/apps/photos/src/components/PhotoViewer/FileInfo/index.tsx @@ -171,7 +171,7 @@ export function FileInfo({ useEffect(() => { const mapEnabled = getMapEnabled(); setShowMap(mapEnabled); - }, [file, showInfo]); + }, []); if (!file) { return <>;