fix: AppLayout 未挂载——路由改为两层 Outlet 嵌套,AuthGuard 不再包裹 AppLayout
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user