Add New Route
src/modules/routesConfig.jsconst routesConfig = [ ..., { id: 'new-group', title: 'Gropup Name', messageId: 'sidebar.app.newGroup', type: 'group', children:[...] } ]const routesConfig = [ ..., { id: 'new-group', title: 'Gropup Name', messageId: 'sidebar.app.newGroup', type: 'group', children: [ { id: 'new-menu', title: 'New Menu', messageId: 'sidebar.app.dashboard.newMenu', type: 'item', icon: 'menu_icon', url: '/new-group/new-menu', }, ... ], }, ];const routesConfig = [ ..., { id: 'new-group', title: 'Gropup Name', messageId: 'sidebar.app.newGroup', type: 'collapse', children:[...] } ]const routesConfig = [ ..., { id: 'new-group', title: 'Gropup Name', messageId: 'sidebar.app.newGroup', type: 'collapse', children: [ { id: 'new-menu', title: 'New Menu', messageId: 'sidebar.app.dashboard.newMenu', type: 'item', icon: 'menu_icon', url: '/new-group/new-menu', }, ... ], }, ];
import React from 'react'; import AppPage from '../@crema/hoc/DefaultPage/index'; import asyncComponent from '../@crema/utility/asyncComponent'; const NewPage= asyncComponent(() => import('YOUR_COMPONENT_PATH')); export default AppPage(() => <NewPage/>);import React from 'react'; import AppPage from '../../../@crema/hoc/AppPage'; import asyncComponent from '../../../@crema/utility/asyncComponent'; const NewPage= asyncComponent(() => import('YOUR_COMPONENT_PATH')); export default AppPage(() => <NewPage/>);
Last updated