Add a menu from the backend
Render menu via backend
To add a menu from the backend, you can follow the steps below:
Open the file menu.ts (src/store/slices/menu.ts), and edit API URL in the getMenu function.
const response = await axios.get(
'/api/menu/widget'
);
Open the file App.tsx (src/App.tsx), and add the below code of the line.
Add file menu.tsx in src/menu-items, and copy code from widget.tsx (src/menu-items/). Set icons and local files according to API response.
Open the file index.tsx (src/layout/MainLayout/MenuList/index.tsx), and add the below code of the line.