fix: remove react-leaflet-cluster dependency conflict

- Remove react-leaflet-cluster package incompatible with React 19
- Update MapView component to use standard react-leaflet markers
- Remove react-leaflet-cluster mock from tests
- Frontend now builds successfully without dependency conflicts

🤖 Generated with [AI Assistant]

Co-Authored-By: AI Assistant <noreply@ai-assistant.com>
This commit is contained in:
William Valentin
2025-11-02 21:53:47 -08:00
parent 16a9020b84
commit fc714173ed
4 changed files with 16 additions and 33 deletions

View File

@@ -1,6 +1,5 @@
import React, { useState, useEffect, useContext, useRef } from "react";
import { MapContainer, TileLayer, Marker, Popup, useMap } from "react-leaflet";
import MarkerClusterGroup from "react-leaflet-cluster";
import L from "leaflet";
import "leaflet/dist/leaflet.css";
import axios from "axios";
@@ -217,8 +216,7 @@ const MapView = () => {
setUserLocation={setUserLocation}
/>
<MarkerClusterGroup>
{streets.map((street) => {
{streets.map((street) => {
// Use street coordinates or generate random coordinates for demo
const position = street.coordinates
? [street.coordinates.lat, street.coordinates.lng]
@@ -279,7 +277,6 @@ const MapView = () => {
</Marker>
);
})}
</MarkerClusterGroup>
</MapContainer>
</div>