50 lines
1.1 KiB
TypeScript
50 lines
1.1 KiB
TypeScript
/** @format */
|
|
|
|
import type { RouteObject } from "react-router-dom";
|
|
|
|
import NoFound from "@/views/404/404";
|
|
import Login from "./modules/login/index.ts";
|
|
import Register from "./modules/register/index.ts";
|
|
import Main from "./modules/main/index.ts";
|
|
import ComponentLoading from "@/components/ComponentLoading";
|
|
import Loading from "./modules/loading";
|
|
import Forget from "@/router/modules/forget";
|
|
import Home from "@/router/modules/home";
|
|
|
|
const routes: RouteObject[] = [
|
|
{
|
|
path: "/",
|
|
Component: (props) => ComponentLoading(Home, props),
|
|
},
|
|
{
|
|
path: "/register",
|
|
Component: (props) => ComponentLoading(Register, props),
|
|
},
|
|
{
|
|
path: "/404",
|
|
Component: (props) => ComponentLoading(NoFound, props),
|
|
},
|
|
{
|
|
path: "/login",
|
|
Component: (props) => ComponentLoading(Login, props),
|
|
},
|
|
{
|
|
path: "/forget",
|
|
Component: (props) => ComponentLoading(Forget, props),
|
|
},
|
|
{
|
|
path: "/main",
|
|
Component: (props) => ComponentLoading(Main, props),
|
|
},
|
|
{
|
|
path: "/home",
|
|
Component: (props) => ComponentLoading(Home, props),
|
|
},
|
|
{
|
|
path: "/loading",
|
|
Component: Loading,
|
|
},
|
|
];
|
|
|
|
export default routes;
|