add v2 login page
This commit is contained in:
1 parent
659162d60c
commit
cb1e10f0a9
14 files changed
+445
-5
No files matched your search
@@ -1,9 +1,12 @@
|
||||
import { useSelector } from "react-redux";
|
||||
import { lightTheme, darkTheme } from "@/Utils/Theme/v2/theme";
|
||||
import { Navigate, Route, Routes as LibRoutes } from "react-router";
|
||||
import { ThemeProvider } from "@emotion/react";
|
||||
import HomeLayout from "../Components/Layouts/HomeLayout";
|
||||
import NotFound from "../Pages/v1/NotFound";
|
||||
|
||||
// Auth
|
||||
import AuthLogin from "../Pages/v1/Auth/Login";
|
||||
import AuthLoginV2 from "@/Pages/v2/Auth/Login";
|
||||
import AuthRegister from "../Pages/v1/Auth/Register/";
|
||||
import AuthForgotPassword from "../Pages/v1/Auth/ForgotPassword";
|
||||
import AuthCheckEmail from "../Pages/v1/Auth/CheckEmail";
|
||||
@@ -54,6 +57,8 @@ import BulkImport from "../Pages/v1/Uptime/BulkImport";
|
||||
import Logs from "../Pages/v1/Logs";
|
||||
|
||||
const Routes = () => {
|
||||
const mode = useSelector((state) => state.ui.mode);
|
||||
const v2Theme = mode === "light" ? lightTheme : darkTheme;
|
||||
const AdminCheckedRegister = withAdminCheck(AuthRegister);
|
||||
return (
|
||||
<LibRoutes>
|
||||
@@ -214,6 +219,14 @@ const Routes = () => {
|
||||
path="/login"
|
||||
element={<AuthLogin />}
|
||||
/>
|
||||
<Route
|
||||
path="/v2/login"
|
||||
element={
|
||||
<ThemeProvider theme={v2Theme}>
|
||||
<AuthLoginV2 />
|
||||
</ThemeProvider>
|
||||
}
|
||||
/>
|
||||
|
||||
<Route
|
||||
path="/register"
|
||||
|
||||
Reference in new issue
Block a user