mirror of
https://dev.azure.com/globalhealthx/EMR/_git/helix-engage
synced 2026-04-11 18:28:15 +00:00
fix: add auth guard redirect and wire logout into NavAccountCard
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
29
src/main.tsx
29
src/main.tsx
@@ -2,6 +2,7 @@ import { StrictMode } from "react";
|
||||
import { createRoot } from "react-dom/client";
|
||||
import { BrowserRouter, Outlet, Route, Routes } from "react-router";
|
||||
import { AppShell } from "@/components/layout/app-shell";
|
||||
import { AuthGuard } from "@/components/layout/auth-guard";
|
||||
import { NotFound } from "@/pages/not-found";
|
||||
import { AllLeadsPage } from "@/pages/all-leads";
|
||||
import { CampaignDetailPage } from "@/pages/campaign-detail";
|
||||
@@ -24,19 +25,21 @@ createRoot(document.getElementById("root")!).render(
|
||||
<RouteProvider>
|
||||
<Routes>
|
||||
<Route path="/login" element={<LoginPage />} />
|
||||
<Route
|
||||
element={
|
||||
<AppShell>
|
||||
<Outlet />
|
||||
</AppShell>
|
||||
}
|
||||
>
|
||||
<Route path="/" element={<LeadWorkspacePage />} />
|
||||
<Route path="/leads" element={<AllLeadsPage />} />
|
||||
<Route path="/campaigns" element={<CampaignsPage />} />
|
||||
<Route path="/campaigns/:id" element={<CampaignDetailPage />} />
|
||||
<Route path="/outreach" element={<OutreachPage />} />
|
||||
<Route path="*" element={<NotFound />} />
|
||||
<Route element={<AuthGuard />}>
|
||||
<Route
|
||||
element={
|
||||
<AppShell>
|
||||
<Outlet />
|
||||
</AppShell>
|
||||
}
|
||||
>
|
||||
<Route path="/" element={<LeadWorkspacePage />} />
|
||||
<Route path="/leads" element={<AllLeadsPage />} />
|
||||
<Route path="/campaigns" element={<CampaignsPage />} />
|
||||
<Route path="/campaigns/:id" element={<CampaignDetailPage />} />
|
||||
<Route path="/outreach" element={<OutreachPage />} />
|
||||
<Route path="*" element={<NotFound />} />
|
||||
</Route>
|
||||
</Route>
|
||||
</Routes>
|
||||
</RouteProvider>
|
||||
|
||||
Reference in New Issue
Block a user