diff --git a/frontend/src/components/MapComponent.js b/frontend/src/components/MapComponent.js index e32a35b..faf979c 100644 --- a/frontend/src/components/MapComponent.js +++ b/frontend/src/components/MapComponent.js @@ -34,6 +34,7 @@ const useFetchMultipleData = (urls) => { return data; }; + const IconMarker = memo(({ poi, icon }) => { const openInNewTab = useCallback((url) => { const newWindow = window.open(url, '_blank', 'noopener,noreferrer'); @@ -46,21 +47,36 @@ const IconMarker = memo(({ poi, icon }) => {

{poi.name}

{poi.description}

- {poi.images.map(([thumbnailUrl, imageUrl]) => ( - {`Thumbnail openInNewTab(imageUrl)} - /> - ))} +
+ {poi.images.map(([thumbnailUrl, imageUrl], index) => ( +
+ {`Thumbnail openInNewTab(imageUrl)} + /> +
+ ))} +
); }); + const MapComponent = () => { const geoJsonUrls = useMemo(() => [ 'maps/world_part1.json',