Closed
Description
i got this error
Expected marker with id 'marker-:r9:' to be rendered, but none was found.
import { Marker as LeafletMarker } from '@adamscybot/react-leaflet-component-marker'
import { useRouter } from 'next/router'
import { StyledPin } from './styles'
const StyledMarker = ({ uid }) => {
const router = useRouter()
const goToRoute = () => {
router.push(`/locations/${uid}`)
}
return (
<>
<StyledPin onClick={goToRoute}> </StyledPin>
</>
)
}
interface CustomMarkerProps {
id: string
uid: string
lng: number
lat: number
}
const Marker: React.FC<CustomMarkerProps> = ({ lng, lat, ...rest }) => {
return (
<LeafletMarker
icon={<StyledMarker {...rest} />}
position={[lat, lng]}
/>
)
}
export default Marker
Metadata
Metadata
Assignees
Labels
No labels