all repos — caroster @ 849c97cdd553d8042bfa8987aa162353967e8e55

[Octree] Group carpool to your event https://caroster.io

frontend/containers/Map/MapController.tsx (view raw)

 1import {useMap} from 'react-leaflet';
 2import useMapStore from '../../stores/useMapStore';
 3
 4const MapController = () => {
 5  const map = useMap();
 6  const {setMap, map: storedMap} = useMapStore();
 7  map.scrollWheelZoom.disable();
 8
 9  if (storedMap !== map) {
10    setMap(map);
11  }
12
13  return <></>;
14};
15
16export default MapController;