"use client"; import { useState } from "react"; import Leaflet from "leaflet"; import { MapContainer, TileLayer, Marker, Popup } from "react-leaflet"; Leaflet.Icon.Default.imagePath = "../node_modules/leaflet"; Leaflet.Icon.Default.mergeOptions({ iconUrl: "https://unpkg.com/leaflet@1.7.1/dist/images/marker-icon.png", shadowUrl: "https://unpkg.com/leaflet@1.7.1/dist/images/marker-shadow.png", }); function LocationMarker() { const [position, setPosition] = useState(null); return position === null ? null : ( You are here ); } interface MapState { lat: number; lng: number; zoom: number; } const LocationMarkerMap = ({ height = 350 }: { height?: number }) => { const [state, setState] = useState({ lat: 51.505, lng: -0.09, zoom: 13, }); const position: [number, number] = [state.lat, state.lng]; return ( ); }; export default LocationMarkerMap;