fix(navbar): show Dashboard instead of Classes label for admin users - #601
fix(navbar): show Dashboard instead of Classes label for admin users#601AbiramiR-27 wants to merge 2 commits into
Conversation
NewtonLC
left a comment
There was a problem hiding this comment.
Hi @AbiramiR-27, thank you for working on this issue! I tested your code, and it works as expected. Before merging this though, I'd like to modify it to also hide this button if the user is not signed in, or if the user has a role other than ADMIN or TEACHER.
Would you be alright with adding those changes? If not, no worries! I can patch it later this week.
|
Thank you for testing the changes and for the feedback! I'd be happy to make the additional updates. I'll modify the implementation to hide the button when the user is not signed in and when the user's role is neither ADMIN nor TEACHER, then update the PR shortly. |
13b92af to
3e5d6f1
Compare
|
Hi Abirami, I apologize for the wait. At the moment, we still aren't able to give a clear date for when we can review and merge your PRs. I still appreciate your work on both of them and will definitely reach out once we are able to review them. |
|
Hi @NewtonLC, |
Checklist:
Closes #597
This PR dynamically renames the navbar link
"Classes"to"Dashboard"forADMINusers to match the actual destination page.Changes:
sessioncallback to NextAuth config to expose user roles to the client.Navbarto recursively find and update the label for links to/classesbased on user role.navbar.test.jsxto cover both admin and teacher role scenarios.