import { useState } from 'react' import { Navigate, Route, Routes } from 'react-router-dom' import { AppLayout } from './components/AppLayout' import { createIncident, isOpen } from './lib/incidents' import { currentUser, seedIncidents } from './lib/seed' import type { NewIncident } from './lib/types' import { About } from './pages/About' import { Analytics } from './pages/Analytics' import { Incidents } from './pages/Incidents' import { Locations } from './pages/Locations' import { Overview } from './pages/Overview' import { ReportIncident } from './pages/ReportIncident' export default function App() { // In-memory store until the backend lands (Phase 1) const [incidents, setIncidents] = useState(seedIncidents) const addIncident = (report: NewIncident) => setIncidents((current) => [createIncident(report, current, currentUser.name, new Date()), ...current]) return ( }> } /> } /> } /> } /> } /> } /> } /> ) }