Code styling fixes

This commit is contained in:
2023-08-13 17:16:30 +03:00
parent 326016be2a
commit 410931b475
20 changed files with 46 additions and 34 deletions

View File

@ -0,0 +1,15 @@
import { useMapEvent } from 'react-leaflet'
import { LatLng } from 'leaflet'
import { SetState } from '../utils/types'
function MapClickHandler({ setPosition }: { setPosition: SetState<LatLng> }) {
const map = useMapEvent('click', (e) => {
setPosition(e.latlng)
map.setView(e.latlng)
})
return null
}
export default MapClickHandler