Routing
How to add page to sidebar ?
Add same path as same as you put the page into pages folder.
// ------------------------------------------------------------------------
// File: app/(dashboard-layout)/layout/vertical/sidebar/sidebaritems.ts
// ------------------------------------------------------------------------
const SidebarContent = MenuItem[] = [
{
heading: "Dashboard",
items: [,
{
id: uniqueId(),
name: 'Analytics',
icon: "solar:chart-square-line-duotone",
url: '/',
}
{
id: uniqueId(),
name: 'eCommerce',
icon: "solar:cart-line-duotone",
url: '/dashboards/ecommerce',
}
],
},
]
How to add page to Horizontal sidebar ?
Add same path as same as you put the page into pages folder.
// ------------------------------------------------------------------------
// File: app/(dashboard-layout)/layout/horizontal/menudata.ts
// ------------------------------------------------------------------------
const Menuitems = MenuItem[] = [
{
{
id: uniqueId(),
title: 'Dashboard',
icon: "solar:chart-square-line-duotone",
href: '',
children: [
{
title: 'Modern',
icon: 'solar:widget-2-linear',
id: uniqueId(),
href: '/',
},
{
title: 'eCommerce',
icon: "solar:cart-line-duotone",
id: uniqueId(),
href: '/dashboards/ecommerce',
}
],
}
],
},
]