app/page.js corresponds to the root route (/), while app/dashboards/crm corresponds to /crm.
Following are the fundamental building blocks to creating a route.
import React, { Fragment } from "react";
import Link from 'next/link';
import { useRouter } from "next/navigation";
<
ul>
<
li>
<
Link href="/dashboards/crm">Crm
<
/Link>
<
/li>
<
li>
<
Link href="/dashboards/sales">Sales
<
/Link>
<
/li>
<
li>
<
Link href="/blog/hello-world">Blog Post
<
/Link>
<
/li>
<
/ul>
Following are the fundamental building blocks to creating a new link.
├── shared
├──layout-components
├──sidebar
nav.js
export const MENUITEMS: any = [
{
menutitle: "MAIN",
},
{
icon: DashboardIcon,
badgetxt: badge,
title: "Dashboards",
type: "sub",
active: false,
children: [
{
path: "/dashboards/crm",
type: "link",
active: false,
selected: false,
dirchange: false,
title: "CRM",
},
{
path: "/dashboards/ecommerce",
type: "link",
active: false,
selected: false,
dirchange: false,
title: "Ecommerce",
},
{
path: "/dashboards/crypto",
type: "link",
active: false,
selected: false,
dirchange: false,
title: "Crypto",
},
]
}
]