Next.js Discord

Discord Forum

Handle multiple roles that access the same route

Unanswered
Barbary Lion posted this in #help-forum
Open in Discord
Barbary LionOP
I am wondering what is the best approach to use if i have for example a page "/dashboard" but the content of the page will be different for each role "admin" or "employee", is it better to use an condition in the dashboard component to render the component based on the role, or to use different routes for each role like "/dashboard/admin" and "/dashboard/employee" ??

3 Replies