feat: Oauth update

This commit is contained in:
landaiqing
2024-05-27 00:00:57 +08:00
parent 7f68128b5e
commit e564264c4d
10 changed files with 340 additions and 305 deletions

View File

@@ -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;

View 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;