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
action.payload.login
toaction.payload.email
.Purpose
Describe the problem or feature in addition to a link to the issues.
Approach
How does this change address the problem?
When submitting an order, the 'order_by' property is being set to
auth.email
(if it exists). When a user logs in, their email and token is dispatched and stored in state with a type and a payload (type being 'login' and the payload being an object that contains properties foremail
andtoken
). However, when authReducer runs to store that payload into state, it sets the email property in state toaction.payload.login
. The issue here is thatlogin
does not exist in the payload, it should beemail
.Pre-Testing TODOs
What needs to be done before testing
Testing Steps
How do the users test this change?
Learning
Describe the research stage
redux
folder in the repo, I check to see where dispatch is being called in order to update state with auth information.authActions
, I notice that the action object contains properties for the type (which is 'login') and a payload (which contains the propertiesemail
andtoken
).action.payload.login
. The issue is thatlogin
was not a property in our payload, and that it should beaction.payload.email
instead.Links to blog posts, patterns, libraries or addons used to solve this problem
Redux Documentation - the official documentation on Redux data flow helped me understand the process of calling dispatch (which runs the store's reducer function) to update state.
Closes Shift3#4