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.
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: full-version\src\routes\index.tsx
// import { lazy } from 'react';
import { createBrowserRouter } from 'react-router-dom';
// routes
import AuthenticationRoutes from './AuthenticationRoutes';
import LoginRoutes from './LoginRoutes';
import MainRoutes from './MainRoutes';
import SimpleRoutes from './SimpleRoutes';
// project imports
// import Loadable from 'ui-component/Loadable';
// const PagesLanding = Loadable(lazy(() => import('views/pages/landing')));
// ==============================|| ROUTING RENDER ||============================== //
const router = createBrowserRouter(
[
// { path: '/', element: <PagesLanding /> },
LoginRoutes,
AuthenticationRoutes,
SimpleRoutes,
MainRoutes
],
{
basename: import.meta.env.VITE_APP_BASE_NAME
}
);
export default router;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 start: full-version\src\routes\index.tsx
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 start: full-version/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: full-version/src/app/page.jsx
Was this helpful?