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.
Changes
List Changes Introduced by this PR
authReducer
to properly update state with the user's email, and the fix inOrderForm
to properly update 'order_item' and 'quantity' .Nav
component has been updated to display the user's email address above the navigation buttons if one is found in state, and displays 'Not logged in!' otherwise. TheuseSelector
hook is being used to pull auth data from state.Purpose
Describe the problem or feature in addition to a link to the issues.
Approach
How does this change address the problem?
This change displays the user's status directly above the navigation buttons. If the user is logged in, it will display 'Current User: ' followed by their email address. If the user is not logged in (as in, no auth data in state due to navigating to a page directly), it will display 'Current User: Unknown!'.
Pre-Testing TODOs
What needs to be done before testing
Testing Steps
How do the users test this change?
Learning
Describe the research stage
Prior knowledge from previous tasks on using the
useSelector
hook to pull auth data from state. Otherwise, there was no research required for this task.Closes Shift3#10