Login as First Page
How to set login as First page instead landing
This section explains how to set the login page as the default starting page, skipping the landing page for cases where it is not needed.
Update route at: full-version\src\routes\index.tsx
// import { lazy } from 'react';
import { createBrowserRouter } from 'react-router-dom';
// project import
import MainRoutes from './MainRoutes';
import LoginRoutes from './LoginRoutes';
import ComponentsRoutes from './ComponentsRoutes';
// import { SimpleLayoutType } from 'config';
// import SimpleLayout from 'layout/Simple';
// import Loadable from 'components/Loadable';
// render - landing page
// const PagesLanding = Loadable(lazy(() => import('pages/landing')));
// ==============================|| ROUTING RENDER ||============================== //
const router = createBrowserRouter(
[
// {
// path: '/',
// element: <SimpleLayout layout={SimpleLayoutType.LANDING} />,
// children: [
// {
// index: true,
// element: <PagesLanding />
// }
// ]
// },
LoginRoutes,
ComponentsRoutes,
MainRoutes
],
{ basename: import.meta.env.VITE_APP_BASE_NAME }
);
export default router;2. Add default Login route: full-version\src\routes\LoginRoutes.tsx
This section explains how to set the login page as the default starting page, skipping the landing page for cases where it is not needed.
Update route at: full-version\src\routes\index.jsx
2. Add default Login route: full-version\src\routes\LoginRoutes.jsx
This section explains how to set the Login page as the default starting page, skipping the landing page, for cases where it is not needed.
Update Route start: src/app/page.tsx
This section explains how to set the Login page as the default starting page, skipping the landing page, for cases where it is not needed.
Update Route start: src/app/page.jsx