app/page.js corresponds to the root route (/), while app/dashboard/gaming 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/router";
<ul>
<li>
<Link href="/">Home
</Link>
</li>
<li>
<Link href="/about">About Us
</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
├──layouts-components
├──sidebar
├──nav.tsx
export const MENUITEMS:any = [
{
menutitle: "Main",
},
{
path: "/components/dashboard/dashboard", title: "Dashboard", icon: "ti-home", type: "link", active: false, selected: false, dirchange: false
},
{
title: "Crypto Currencies", icon: "ti-wallet", type: "sub", active: false, selected: false, dirchange: false,
children: [
{ path: "/components/cryptocurrencies/dashboard", type: "link", active: false, selected: false, dirchange: false, title: "Dashboard" },
{ path: "/components/cryptocurrencies/marketcap", type: "link", active: false, selected: false, dirchange: false, title: "Marketcap" },
{ path: "/components/cryptocurrencies/currencyexchange", type: "link", active: false, selected: false, dirchange: false, title: "Currency exchange" },
{ path: "/components/cryptocurrencies/buysell", type: "link", active: false, selected: false, dirchange: false, title: "Buy & Sell" },
{ path: "/components/cryptocurrencies/wallet", type: "link", active: false, selected: false, dirchange: false, title: "Wallet" },
{ path: "/components/cryptocurrencies/transcations", type: "link", active: false, selected: false, dirchange: false, title: "Transactions" },
],
},
]