Render Menu from the backend
Render menu via backend
Able Pro is already rendering the menu from the backend. The dashboard menus (Default, Analytics) are rendered via the back end.
You can check the Fack backend API here that we used to render the menu: https://github.com/phoenixcoded20/mock-data-api-nextjs
To add a menu from the backend, you can follow the steps below:
Open the file menu.ts
(src/api/menu.ts)
, and edit the API URL in the useGetMenu function.
Create Menu File
Add file menu.tsx in
src/menu-items
, and copy code fromdashboard.tsx
(src/menu-items/)
. Set icons and local files according to API response.Add file menu.jsx in
src/menu-items
, and copy code fromdashboard.jsx
(src/menu-items/)
. Set icons and local files according to API response.
Open the file index.tsx
(
src/layout/Dashboard/Drawer/DrawerContent/Navigation/index.tsx
)
, and add the below code of the line.
Last updated