import { Loader2 } from 'lucide-react' import { 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 './screens/Candidates' import { Slate } from './tools/slatematch/Slate' import { CommandCenter } from './screens/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 ( }> } /> } /> } /> {/* Legacy flat evaluate path kept so existing deep links keep resolving. */} } /> } /> } /> } /> } /> } /> } /> } /> ) }