Checkout Pro Version

Routing

1. How to add a new route?

                            
// ----------------------------------------------------
// File: src/routes/Router.tsx
// ----------------------------------------------------

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/full/vertical/sidebar/Menuitems.ts
// ----------------------------------------------------

const Menuitems = MenuitemsType[] = [
  {
    id: uniqueId(),
    title: 'Modern',
    icon: IconAperture,
    href: '/dashboards/modern',
    chip: 'New',
    chipColor: 'secondary',
  },
  {
    id: uniqueId(),
    title: 'eCommerce',
    icon: IconShoppingCart,
    href: '/dashboards/ecommerce',
  },
]