import LeafletMap from '@/components/map/LeafletMap.tsx'; import MapHeader from '@/components/map/MapHeader.tsx'; import MapSidebar from '@/components/map/MapSidebar.tsx'; import ModuleErrorBoundary from '@/components/ui/ModuleErrorBoundary.tsx'; import { MapProvider, useMapUI } from '@/contexts/MapContexts.tsx'; import { useOrganizations } from '@/hooks/useOrganizations.ts'; const MapView = () => { const { organizations, isLoading } = useOrganizations(); // Show loading state while organizations are loading if (isLoading || !organizations) { return (

Loading map...

); } const MapContent = () => { const { isSidebarOpen, setIsSidebarOpen } = useMapUI(); return ( <>
{isSidebarOpen && (
setIsSidebarOpen(false)} className="fixed inset-0 bg-black/50 z-20 md:hidden" aria-hidden="true" /> )}
); }; return (
); }; export default MapView;