feat: 添加路由树统一数据源,新增 antd/icons 依赖

This commit is contained in:
2026-05-15 11:41:45 +08:00
parent b6e2174b55
commit 5ab18fc612
5 changed files with 79 additions and 12 deletions

View File

@@ -1,18 +1,13 @@
import { createBrowserRouter } from 'react-router';
import RootLayout from './layouts/RootLayout';
import About from './pages/About';
import Home from './pages/Home';
import NotFound from './pages/NotFound';
import { routes } from './routes';
import { toRouteObjects } from './routes/utils';
const router = createBrowserRouter([
{
path: '/',
element: <RootLayout />,
children: [
{ index: true, element: <Home /> },
{ path: 'about', element: <About /> },
{ path: '*', element: <NotFound /> },
],
children: toRouteObjects(routes),
},
]);