Routing
This template routing system based on react-router and its package react-router-dom, it's also use code splitting for better performance.
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 RouteAdd 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?