set menu item following role

Closed
G General June 03, 2023
Login to reply
Ravi Sharma
3 months ago

I am not using backend for the routing, how to implement it on the frontend itself ?

Coded Themes Support Agent
1 year ago

Hi,

Thanks for reaching out.

You can render the menu from the backend itself based on the logged-in user role. We have also provided one example to load the menu from the backend, you can mimic the same as per your requirement.

Check here about loading the menu from the backend: full-version/src/menu-items/widget.tsx


Hope that answers your query. Feel feel to reach out again if any further questions.

Regards,

Rakesh

Phonesavan Rasabandith
1 year ago

Dear Sir.

I would like to ask you about how to set menu item following role. I have user role as ADMIN and USER, I would like to set ADMIN can see all menu item while USER role can see only some menu item.

Please kindly guide me how to set in code


Best regard.

Additional Info

Order#: #65162

Name of Product/template: React