Please configure the React routing to make the Login page as the default starting page of the application (/).
Follow these specific requirements:
-
Modify
src/routes/index.tsx:- Remove the default Landing Page route that is currently serving
/. - Ensure
LoginRoutesis imported and included in thecreateBrowserRouterarray.
- Remove the default Landing Page route that is currently serving
-
Modify
src/routes/LoginRoutes.tsx:- Change the login route definition to serve at the root path
/. - Crucially, keep the existing
loginpath (/login) as well. This is to ensure that redirects (like after logout) that point to/logindo not break. - The
LoginRoutesstructure should handle both/and/loginpointing to the login component (e.g.,<JwtAuthLogin />).
- Change the login route definition to serve at the root path
In src/routes/index.tsx:
Remove the landing page block:
// REMOVE THIS BLOCK
// {
// path: '/',
// element: <SimpleLayout layout={SimpleLayoutType.LANDING} enableElevationScroll />,
// children: [
// {
// index: true,
// element: <PagesLanding />
// }
// ]
// },In src/routes/LoginRoutes.tsx:
Update the children array for your auth provider (e.g., JWT):
children: [
{ path: '/', element: <JwtAuthLogin /> }, // NEW: Default route
{ path: 'login', element: <JwtAuthLogin /> }, // KEEP: For compatibility/redirects
// ... other existing routes
]