feat: implement ScanTerminalDashboard with map visualization and opportunity tracking components

This commit is contained in:
2569718930@qq.com
2026-04-24 05:09:19 +08:00
parent 1f87e19cb0
commit 5cc08249e2
4 changed files with 232 additions and 47 deletions
+6 -1
View File
@@ -5,7 +5,11 @@ import "leaflet/dist/leaflet.css";
import { useDashboardStore } from "@/hooks/useDashboardStore";
import { useLeafletMap } from "@/hooks/useLeafletMap";
export function MapCanvas() {
export function MapCanvas({
onCitySelect,
}: {
onCitySelect?: (cityName: string) => void;
} = {}) {
const store = useDashboardStore();
const { containerRef } = useLeafletMap({
cities: store.cities,
@@ -16,6 +20,7 @@ export function MapCanvas() {
onMapInteractionChange: store.setMapInteractionActive,
onRegisterStopMotion: store.registerMapStopMotion,
onSelectCity: (cityName) => {
onCitySelect?.(cityName);
void store.focusCity(cityName);
},
selectedCity: store.selectedCity,