Render Menu from the backend
Render menu via backend
Able pro is already rendering menu from backend. The dashboard menus (Default, Analytics) are rendered via back end.
You can check Fack backend API here that we used to render 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 API URL in the useGetMenu function.
src/api/menu.ts
Add file menu.tsx in src/menu-items, and copy code from dashboard.tsx (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.
src/layout/Dashboard/Drawer/DrawerContent/Navigation/index.tsx
Last updated