Routing
Page and URL routing
Configure route
import { lazy } from 'react';
import { createBrowserRouter } from 'react-router-dom';
// project import
import MainRoutes from './MainRoutes';
import GuestLayout from 'layouts/GuestLayout';
// render - landing page
const PagesLanding = lazy(() => import('../views/page-layouts/Landing'));
// ==============================|| ROUTING RENDER ||============================== //
const router = createBrowserRouter(
[
{
path: '/',
element: <GuestLayout />,
children: [
{
index: true,
element: <PagesLanding />
}
]
},
MainRoutes
],
{ basename: import.meta.env.VITE_APP_BASE_NAME }
);
export default router;Last updated