import { Loader2 } from 'lucide-react' import { Navigate, Route, Routes } from 'react-router-dom' import { AppShell } from './components/AppShell' import { Dashboard } from './screens/Dashboard' import { ScreeningQueue } from './tools/screenmatch/ScreeningQueue' import { CandidateEvaluation } from './tools/screenmatch/CandidateEvaluation' import { Requirements } from './screens/Requirements' import { Candidates } from './tools/missionmatch/Candidates' import { Slate } from './tools/slatematch/Slate' import { CommandCenter } from './tools/missionmatch/CommandCenter' import { Compliance } from './screens/Compliance' import { Settings } from './screens/Settings' import { Placeholder } from './screens/Placeholder' import { Login } from './screens/Login' import { AcceptInvite } from './screens/AcceptInvite' import { AuthProvider } from './lib/AuthContext' import { useAuth } from './lib/useAuth' export default function App() { return ( } /> } /> ) } // Gate renders the app only for a validated session; otherwise the login. The session check runs once on // load, so a reload never flashes the app before auth resolves. function Gate() { const { principal, loading } = useAuth() if (loading) { return (
) } if (!principal) { return } return ( }> {/* missionMATCH Command Center is the default surface after login. */} } /> {/* missionMATCH */} } /> } /> } /> {/* screenMATCH */} } /> } /> } /> {/* slateMATCH */} } /> {/* shared */} } /> } /> {/* Legacy paths kept so existing links and deep links keep resolving after the tool split. */} } /> } /> } /> } /> ) }