From b4cedec019886450a378a1db0daa2ef61a194e26 Mon Sep 17 00:00:00 2001 From: Eleni Veniou Nikolidaki Date: Mon, 26 Aug 2024 23:47:47 +0300 Subject: [PATCH] Fix authReducer --- client/src/reducers/authReducer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/reducers/authReducer.js b/client/src/reducers/authReducer.js index 3eeae4b..eae842f 100644 --- a/client/src/reducers/authReducer.js +++ b/client/src/reducers/authReducer.js @@ -62,7 +62,7 @@ const authReducer = (state = initialState, action) => { error: null, }; console.log("Success - New state:", newStateOnSuccess); - return newState; + return newStateOnSuccess; case REGISTER_FAIL: case LOGIN_FAIL: console.log("Fail - Reducer action payload:", action.payload); @@ -74,7 +74,7 @@ const authReducer = (state = initialState, action) => { error: action.payload, }; console.log("Fail - New state:", newStateOnFailure); - return newState; + return newStateOnFailure; case LOG_OUT: return { ...state,