For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

  1. Update Route start: full-version\src\routes\index.tsx

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;
  1. 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.

  1. Update Route start: full-version\src\routes\index.jsx

  1. 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.

  1. 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.

  1. Update Route start: full-version/src/app/page.jsx

Last updated