mirror of
https://github.com/PlayEdu/frontend.git
synced 2025-12-23 18:59:44 +08:00
增加初始化page
This commit is contained in:
@@ -1,20 +1,26 @@
|
||||
import { lazy } from "react";
|
||||
import { RouteObject } from "react-router-dom";
|
||||
|
||||
import { LayoutPage } from "../pages";
|
||||
import { InitPage } from "../pages/init";
|
||||
|
||||
// 懒加载
|
||||
const LoginPage = lazy(() => import('../pages/login'))
|
||||
const LoginPage = lazy(() => import("../pages/login"));
|
||||
const IndexPage = lazy(() => import("../pages/index"));
|
||||
|
||||
const routes: RouteObject[] = [
|
||||
{
|
||||
path: "/",
|
||||
element: <LayoutPage />,
|
||||
children: [],
|
||||
},
|
||||
{
|
||||
path: "/login",
|
||||
element: <LoginPage />,
|
||||
element: <InitPage />,
|
||||
children: [
|
||||
{
|
||||
path: "/",
|
||||
element: <IndexPage />,
|
||||
},
|
||||
{
|
||||
path: "/login",
|
||||
element: <LoginPage />,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user