fix: hide map icon after map image load

This commit is contained in:
Isaac
2023-01-08 22:05:32 +00:00
parent d7b85b2009
commit 25c7218f1b

View File

@@ -55,7 +55,7 @@ function PhotoInformation({ info, url, api }) {
const [width, setWidth] = useState(0);
const [height, setHeight] = useState(0);
const [usePhotoMap, setPhotoMap] = useState(false);
const [setMapIcon] = useState(true);
const [, setMapIcon] = useState(true);
const [showExtraInfo, setshowExtraInfo] = useState(false);
//const [showOld, setShowOld] = useState(true);
const [other, setOther] = useState(false);
@@ -210,7 +210,7 @@ function PhotoInformation({ info, url, api }) {
onMouseLeave={() => setshowExtraInfo(false)}
>
<div className={photoMapClassList}>
{photoMap !== null ? <MdLocationOn /> : ''}
{!usePhotoMap ? <MdLocationOn /> : ''}
<h1>{photoMap}</h1>
{photoMap()}
</div>