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
├──sidemenu.tsx
export const MENUITEMS: any= [
{
menutitle: "MAIN",
},
{
path:"/components/dashboard/indexpage", title: "Dashboard", icon: dashboardsvg, type: "link", active: false, selected: false, dirchange: false
},
{
menutitle: "PAGES",
},
{
title: "Pages", icon: pagesSvg, type: "sub", active: false, selected: false, dirchange: false,
children: [
{ path:"/components/pages/profile", type: "link", active: false, selected: false, dirchange: false, title: "Profile" },
{ path:"/components/pages/notificationlist", type: "link", active: false, selected: false, dirchange: false, title: "Notification List" },
{ path:"/components/pages/mailinbox", type: "link", active: false, selected: false, dirchange: false, title: "Mail-Inbox" },
{ path:"/components/pages/gallery", type: "link", active: false, selected: false, dirchange: false, title: "Gallery" },
{
title: "Extension", type: "sub", menusub: true, active: false, selected: false, dirchange: false,
children: [
{ path:"/components/pages/extension/aboutcompany", type: "link", active: false, selected: false, dirchange: false, title: "About Company" },
{ path:"/components/pages/extension/faq", type: "link", active: false, selected: false, dirchange: false, title: "FAQS" },
],
},
{
title: "File Manager", type: "sub", menusub: true, active: false, selected: false, dirchange: false,
children: [
{ path:"/components/pages/filemanager/filemanager", type: "link", active: false, selected: false, dirchange: false, title: "File Manager" },
{ path:"/components/pages/filemanager/filemanagerlist", type: "link", active: false, selected: false, dirchange: false, title: "File Manager List" },
],
},
],
},
]