import { Route, Routes } from "react-router-dom"; import { Toaster } from "sonner"; import { Layout } from "@/components/Layout"; import { DrillStackProvider } from "@/components/drill/DrillStackProvider"; import { Dashboard } from "@/pages/Dashboard"; import { Claims } from "@/pages/Claims"; import { Remittances } from "@/pages/Remittances"; import { Providers } from "@/pages/Providers"; import { ActivityLog } from "@/pages/ActivityLog"; import { Upload } from "@/pages/Upload"; import { ReconciliationPage } from "@/pages/Reconciliation"; import { Acks } from "@/pages/Acks"; import { Batches } from "@/pages/Batches"; import { BatchDiff } from "@/pages/BatchDiff"; import Inbox from "@/pages/Inbox"; import { Login } from "@/pages/Login"; import { RequireAuth } from "@/auth/RequireAuth"; function NotFound() { return (
404

That page doesn't exist.

); } export default function App() { return ( {/* /login sits OUTSIDE the auth-gated Layout so an unauthenticated operator can reach the sign-in screen. */} } /> {/* Every other route inherits the auth gate via RequireAuth wrapping the Layout outlet. Authenticated operators see the full app; unauthenticated ones are bounced back here with `?next=`. */} }> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> ); }