"use client"; import "leaflet/dist/leaflet.css"; import { MapContainer, Polyline, TileLayer, CircleMarker, useMap } from "react-leaflet"; import type { RoutePoint } from "@/lib/models/running"; type FitBoundsProps = { points: RoutePoint[] }; function FitBounds({ points }: FitBoundsProps) { const map = useMap(); map.fitBounds(points, { padding: [24, 24] }); return null; } type RouteMapProps = { points: RoutePoint[] }; export function RouteMap({ points }: RouteMapProps) { if (points.length === 0) return null; const start = points[0]; const end = points[points.length - 1]; return ( ); }