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 flat-able/src/routse.js and flat-able/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 Analytic = lazy(() => import("./views/dashboard/analytic"))
const Sales = lazy(() => import("./views/dashboard/sales"))
const Crypto = lazy(() => import("./views/dashboard/crypto"))
const Project = lazy(() => import("./views/dashboard/project"))
const HelpDesk = lazy(() => import("./views/dashboard/helpdesk"))
const StatistcWidget = lazy(() => import("./views/widget/statisticWidget"))
...
...
...
const Route = [
/* Dashboard */
{ exact: true, path: "/dashboard/analyatics", name: "Analytic", component: Analytic },
{ exact: true, path: "/dashboard/sales", name: "Sales", component: Sales },
...
...
]
export default RouteAdd menu item
To add menu items you can use flat-able/src/menu-items.js file. Below code we have show how you can use new menu item.
Last updated
Was this helpful?