Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Bug w/ RoleProvider Role Being Undefined #174

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

brelieu05
Copy link
Collaborator

Authors:
brelieu05, jessieh9

What does this PR contain?
Fixed the bug regarding RoleProvider.role returning undefined due to App.jsx not being a descendent of RoleProvider, thus couldn't useContext(RoleContext). Fixed it by creating the RoleConsumer component which is a descendent of RoleProvider and wrapped App.jsx.

How did you test these changes?
Consoled role and checked if it was admin/volunteer and redirected to correct route.

Closes #169

@brelieu05 brelieu05 requested review from Aokijiop and NwinNwin April 20, 2024 22:50
@brelieu05 brelieu05 linked an issue Apr 20, 2024 that may be closed by this pull request
Copy link
Collaborator

@Aokijiop Aokijiop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

W solution

@Aokijiop Aokijiop merged commit ebf6541 into main Apr 22, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Login Associated Bug Fixes
3 participants