import { useTheme } from "@core/hooks/useTheme.ts"; import { useEffect, useRef } from "react"; import MapGl, { AttributionControl, type MapRef, NavigationControl, ScaleControl, } from "react-map-gl/maplibre"; interface MapProps { children?: React.ReactNode; onLoad?: (map: MapRef) => void; } export const BaseMap = ({ children, onLoad }: MapProps) => { const { theme } = useTheme(); const darkMode = theme === "dark"; const mapRef = useRef(null); useEffect(() => { const map = mapRef.current; if (map && onLoad) { onLoad(map); } }, [onLoad]); return ( {/* { Disabled for now until we can use i18n for the geolocate control} */} {/* */} {children} ); };