Routing

This template routing system based on react-router and its package react-router-dom, it's also use code splitting for better performance.

How can I add new page with menu item ?

You can use the below explanation to add/remove menu routs and their menu items.

Configure route

Open mintone/src/routse.js and mintone/src/routes.jsYou will find the below example code. In below code we have show how you can add new page route.

import { lazy } from 'react';

const Server = lazy(() => import("./views/dashboard/server"))
const Project = lazy(() => import("./views/dashboard/project/*"))
const Shop = lazy(() => import("./views/dashboard/shop"))
const Analaytics = lazy(() => import("./views/dashboard/analyatics"))
...
...
...

const Route = [
  /* Dashboard */
  { exact: true, path: "/dashboard/server", name: "Server", component: Server },
  { exact: true, path: "/dashboard/analytics", name: "Analaytics", component: Analaytics },
  ...
  ...
]
export default Route

Add menu item

To add menu items you can use mintone/src/menu-items.js file. Below code we have show how you can use new menu item.

Last updated

Was this helpful?