"use client"; import { useEffect, useState } from "react"; import dynamic from "next/dynamic"; import { useNodes } from "@/lib/useNodes"; import { useActiveCalls } from "@/lib/useCalls"; import { useActiveIncidents } from "@/lib/useIncidents"; const MapView = dynamic(() => import("@/components/MapView"), { ssr: false }); export default function MapPage() { const { nodes, loading } = useNodes(); const activeCalls = useActiveCalls(); const incidents = useActiveIncidents(); const [kiosk, setKiosk] = useState(false); const [lastUpdated, setLastUpdated] = useState(null); // Track when data last refreshed useEffect(() => { if (!loading) setLastUpdated(new Date()); }, [nodes, activeCalls, incidents, loading]); // Kiosk mode: full-viewport fixed overlay sits above the sticky nav (z-40 → z-50) if (kiosk) { return (
); } return (

Map

{loading ? (
Loading map…
) : (
)}
); }