27112023
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
import { lazy } from 'react';
|
||||
// import { lazy } from 'react';
|
||||
|
||||
// project import
|
||||
import GuestGuard from 'utils/route-guard/GuestGuard';
|
||||
// import GuestGuard from 'utils/route-guard/GuestGuard';
|
||||
import CommonLayout from 'layout/CommonLayout';
|
||||
import Loadable from 'components/Loadable';
|
||||
// import Loadable from 'components/Loadable';
|
||||
|
||||
// render - login
|
||||
const AuthLogin = Loadable(lazy(() => import('pages/auth/login')));
|
||||
const AuthRegister = Loadable(lazy(() => import('pages/auth/register')));
|
||||
const AuthForgotPassword = Loadable(lazy(() => import('pages/auth/forgot-password')));
|
||||
const AuthCheckMail = Loadable(lazy(() => import('pages/auth/check-mail')));
|
||||
const AuthResetPassword = Loadable(lazy(() => import('pages/auth/reset-password')));
|
||||
const AuthCodeVerification = Loadable(lazy(() => import('pages/auth/code-verification')));
|
||||
// const AuthLogin = Loadable(lazy(() => import('pages/auth/login')));
|
||||
// const AuthRegister = Loadable(lazy(() => import('pages/auth/register')));
|
||||
// const AuthForgotPassword = Loadable(lazy(() => import('pages/auth/forgot-password')));
|
||||
// const AuthCheckMail = Loadable(lazy(() => import('pages/auth/check-mail')));
|
||||
// const AuthResetPassword = Loadable(lazy(() => import('pages/auth/reset-password')));
|
||||
// const AuthCodeVerification = Loadable(lazy(() => import('pages/auth/code-verification')));
|
||||
|
||||
// ==============================|| AUTH ROUTING ||============================== //
|
||||
|
||||
@@ -21,39 +21,39 @@ const LoginRoutes = {
|
||||
{
|
||||
path: '/',
|
||||
element: (
|
||||
<GuestGuard>
|
||||
// <GuestGuard>
|
||||
<CommonLayout />
|
||||
</GuestGuard>
|
||||
// </GuestGuard>
|
||||
),
|
||||
children: [
|
||||
{
|
||||
path: '/',
|
||||
element: <AuthLogin />
|
||||
},
|
||||
{
|
||||
path: 'login',
|
||||
element: <AuthLogin />
|
||||
},
|
||||
{
|
||||
path: 'register',
|
||||
element: <AuthRegister />
|
||||
},
|
||||
{
|
||||
path: 'forgot-password',
|
||||
element: <AuthForgotPassword />
|
||||
},
|
||||
{
|
||||
path: 'check-mail',
|
||||
element: <AuthCheckMail />
|
||||
},
|
||||
{
|
||||
path: 'reset-password',
|
||||
element: <AuthResetPassword />
|
||||
},
|
||||
{
|
||||
path: 'code-verification',
|
||||
element: <AuthCodeVerification />
|
||||
}
|
||||
// {
|
||||
// path: '/',
|
||||
// element: <AuthLogin />
|
||||
// },
|
||||
// {
|
||||
// path: 'login',
|
||||
// element: <AuthLogin />
|
||||
// },
|
||||
// {
|
||||
// path: 'register',
|
||||
// element: <AuthRegister />
|
||||
// },
|
||||
// {
|
||||
// path: 'forgot-password',
|
||||
// element: <AuthForgotPassword />
|
||||
// },
|
||||
// {
|
||||
// path: 'check-mail',
|
||||
// element: <AuthCheckMail />
|
||||
// },
|
||||
// {
|
||||
// path: 'reset-password',
|
||||
// element: <AuthResetPassword />
|
||||
// },
|
||||
// {
|
||||
// path: 'code-verification',
|
||||
// element: <AuthCodeVerification />
|
||||
// }
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -4,7 +4,7 @@ import { lazy } from 'react';
|
||||
import MainLayout from 'layout/MainLayout';
|
||||
import CommonLayout from 'layout/CommonLayout';
|
||||
import Loadable from 'components/Loadable';
|
||||
import AuthGuard from 'utils/route-guard/AuthGuard';
|
||||
// import AuthGuard from 'utils/route-guard/AuthGuard';
|
||||
|
||||
// pages routing
|
||||
const MaintenanceError = Loadable(lazy(() => import('pages/maintenance/404')));
|
||||
@@ -14,6 +14,10 @@ const MaintenanceComingSoon = Loadable(lazy(() => import('pages/maintenance/comi
|
||||
|
||||
// render - sample page
|
||||
const SamplePage = Loadable(lazy(() => import('pages/extra-pages/sample-page')));
|
||||
const Login = Loadable(lazy(() => import('pages/nearle/login')));
|
||||
const Dashboard = Loadable(lazy(() => import('pages/nearle/dashboard')));
|
||||
|
||||
|
||||
|
||||
// ==============================|| MAIN ROUTING ||============================== //
|
||||
|
||||
@@ -23,17 +27,26 @@ const MainRoutes = {
|
||||
{
|
||||
path: '/',
|
||||
element: (
|
||||
<AuthGuard>
|
||||
// <AuthGuard>
|
||||
<MainLayout />
|
||||
</AuthGuard>
|
||||
// </AuthGuard>
|
||||
),
|
||||
children: [
|
||||
{
|
||||
path: 'sample-page',
|
||||
element: <SamplePage />
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'dashboard',
|
||||
element: <Dashboard />
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
path:'/login',
|
||||
element:<Login />
|
||||
},
|
||||
{
|
||||
path: '/maintenance',
|
||||
element: <CommonLayout />,
|
||||
|
||||
Reference in New Issue
Block a user