Skip to content

Commit

Permalink
fix(auth): grab the correct part of the payload for the username
Browse files Browse the repository at this point in the history
Grab email instead of the non-existent login part of the payload

Fixes #4
  • Loading branch information
JimOtermat committed Aug 6, 2022
1 parent 1018bf5 commit 7b742eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion application/src/redux/reducers/authReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const INITIAL_STATE = { email: null, token: null };
export default (state = INITIAL_STATE, action) => {
switch (action.type) {
case LOGIN:
return { ...state, email: action.payload.login, token: action.payload.token }
return { ...state, email: action.payload.email, token: action.payload.token }
case LOGOUT:
return { ...state, ...INITIAL_STATE }
default:
Expand Down

0 comments on commit 7b742eb

Please sign in to comment.