import { useState } from 'react'; import { Marker, Popup } from 'react-map-gl'; import { Amplify } from 'aws-amplify'; import { Heading, Text } from '@aws-amplify/ui-react'; import { MapView } from '@aws-amplify/ui-react-geo'; import '@aws-amplify/ui-react/styles.css'; import '@aws-amplify/ui-react-geo/styles.css'; import awsExports from './aws-exports'; Amplify.configure(awsExports); function MarkerWithPopup({ latitude, longitude }) { const [showPopup, setShowPopup] = useState(false); const handleMarkerClick = ({ originalEvent }) => { originalEvent.stopPropagation(); setShowPopup(true); }; return ( <> {showPopup && ( setShowPopup(false)} > Marker Information Some information about a location. )} ); } export default function MapWithMarkerPopup() { return ( ); }