fix: AppLayout 未挂载——路由改为两层 Outlet 嵌套,AuthGuard 不再包裹 AppLayout

This commit is contained in:
simonkoson
2026-05-22 18:15:31 +08:00
parent f55030b971
commit fcaa0969a8
+3 -8
View File
@@ -27,14 +27,8 @@ function App() {
<BrowserRouter>
<Routes>
<Route path="/login" element={<Login />} />
<Route
path="/"
element={
<AuthGuard>
<AppLayout />
</AuthGuard>
}
>
<Route path="/" element={<AuthGuard />}>
<Route element={<AppLayout />}>
<Route index element={<Navigate to="/dashboard" replace />} />
<Route path="dashboard" element={<Dashboard />} />
<Route path="tps" element={<TPS />} />
@@ -58,6 +52,7 @@ function App() {
}
/>
</Route>
</Route>
</Routes>
</BrowserRouter>
</ConfigProvider>