fix(navbar): show Dashboard instead of Classes label for admin users#601
Open
AbiramiR-27 wants to merge 2 commits into
Open
fix(navbar): show Dashboard instead of Classes label for admin users#601AbiramiR-27 wants to merge 2 commits into
AbiramiR-27 wants to merge 2 commits into
Conversation
NewtonLC
requested changes
Jun 7, 2026
NewtonLC
left a comment
Contributor
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.
Author
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.