feat: Oauth update
This commit is contained in:
@@ -7,8 +7,8 @@ import Login from "./modules/login/index.ts";
|
||||
import Register from "./modules/register/index.ts";
|
||||
import home from "./modules/home/index.ts";
|
||||
import Main from "./modules/main/index.ts";
|
||||
|
||||
import ComponentLoading from "@/components/ComponentLoading";
|
||||
import Loading from "./modules/loading";
|
||||
|
||||
const routes: RouteObject[] = [
|
||||
{
|
||||
@@ -23,10 +23,6 @@ const routes: RouteObject[] = [
|
||||
path: "/register",
|
||||
Component: (props) => ComponentLoading(Register, props),
|
||||
},
|
||||
// {
|
||||
// path: '/home',
|
||||
// Component: home,
|
||||
// },
|
||||
{
|
||||
path: "/login",
|
||||
Component: (props) => ComponentLoading(Login, props),
|
||||
@@ -35,6 +31,10 @@ const routes: RouteObject[] = [
|
||||
path: "/main",
|
||||
Component: (props) => ComponentLoading(Main, props),
|
||||
},
|
||||
{
|
||||
path: "/loading",
|
||||
Component: (props) => ComponentLoading(Loading, props),
|
||||
},
|
||||
];
|
||||
|
||||
export default routes;
|
||||
|
||||
11
src/router/modules/loading/index.ts
Normal file
11
src/router/modules/loading/index.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
/** @format */
|
||||
|
||||
import { lazy } from "react";
|
||||
|
||||
const loading = lazy(
|
||||
() =>
|
||||
new Promise((resolve: any) => {
|
||||
setTimeout(() => resolve(import("@/components/LoadingPage")), 0);
|
||||
}),
|
||||
);
|
||||
export default loading;
|
||||
Reference in New Issue
Block a user