Routing
1. How to add a new route?
// ----------------------------------------------------
// File: /src/routes/Router.js
// ----------------------------------------------------
const ModernDash = Loadable(lazy(() => import('../views/dashboard/Modern')));
const EcommerceDash = Loadable(lazy(() => import('../views/dashboard/Ecommerce')));
const Router = [
{
path: "/",
element: <FullLayout />,
children: [
{ path: "/", element: <Navigate to="dashboards/modern" /> },
{ path: "dashboards/modern", exact: true, element: <ModernDash /> },
{ path: "dashboards/ecommerce", exact: true, element: <EcommerceDash /> },
]
}
]
2. How to add page to sidebar ?
// ----------------------------------------------------
// File: /src/layouts/Sidebar.js
// ----------------------------------------------------
const navigation = [
{
title: "Dashboard",
href: "/starter",
icon: "bi bi-speedometer2",
},
{
title: "Alert",
href: "/alerts",
icon: "bi bi-bell",
},
];