diff options
| author | Larvan2 <[email protected]> | 2026-03-22 23:03:52 +0800 |
|---|---|---|
| committer | Larvan2 <[email protected]> | 2026-03-22 23:04:10 +0800 |
| commit | c8604a7f794dcab8d8a7d58c3c4cbd1c4cd32755 (patch) | |
| tree | 5c2b59688cbd2dec991a1c27b7a5916e4159aa99 /src | |
| parent | b489145e95b26119af697e39255aaad1ed8ecb03 (diff) | |
fix(router): redirect root path to /proxies
Diffstat (limited to 'src')
| -rw-r--r-- | src/app/router.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/app/router.tsx b/src/app/router.tsx index 16a09c3..cfd5fcd 100644 --- a/src/app/router.tsx +++ b/src/app/router.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { HashRouter, Route, RouteObject, Routes, useRoutes } from 'react-router-dom'; +import { HashRouter, Navigate, Route, RouteObject, Routes, useRoutes } from 'react-router-dom'; import Loading from '~/components/Loading'; import Loading2 from '~/components/Loading2'; @@ -23,7 +23,8 @@ const BackendPage = lazy(() => import('../pages/BackendPage')); const StyleGuidePage = lazy(() => import('../pages/StyleGuidePage')); const routes = [ - { path: '/', element: <HomePage /> }, + { path: '/', element: <Navigate to="/proxies" replace /> }, + { path: '/home', element: <HomePage /> }, { path: '/connections', element: <ConnectionsPage /> }, { path: '/configs', element: <ConfigPage /> }, { path: '/logs', element: <LogsPage /> }, |
