Open mahevstark opened 3 months ago
match the route path with a key kepted in your response, if the response contain the key allow the user to enter the route, if not use a layout which always loads first then keep a useLayoutEffect in it to check this
I'm using pro ant design, from "Get Started" button, I have my routes in config/routes.ts and they are only being referenced once in entire project that's config/config.ts, I want to wait for an API response that has list of allowed permissions and then I want to hide/or take out some routes from the list. Like let's say user is not allowed to see "Categories" so the categories menu from routes should be gone. But based on an API response. I tried adding API call in config.ts but awaits are not welcomed there.