update properties stuff
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import React, { useState, useEffect, useRef } from 'react';
|
||||
import React, { useState, useRef } from 'react';
|
||||
import { MapContainer, TileLayer, Marker, Popup, useMapEvents } from 'react-leaflet';
|
||||
import { Icon } from 'leaflet';
|
||||
import 'leaflet/dist/leaflet.css';
|
||||
import toast from 'react-hot-toast';
|
||||
|
||||
// Fix for default markers in react-leaflet
|
||||
delete Icon.Default.prototype._getIconUrl;
|
||||
@@ -14,7 +13,7 @@ Icon.Default.mergeOptions({
|
||||
|
||||
// Component to handle map clicks and update marker position
|
||||
function LocationMarker({ position, setPosition }) {
|
||||
const map = useMapEvents({
|
||||
useMapEvents({
|
||||
click(e) {
|
||||
setPosition([e.latlng.lat, e.latlng.lng]);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user