Feature - Login integration (#7)
* Added: formik and validation schema * Added: Validation schema * Added: logout test integration * Added: Enter key to submit * Added: incorrect password error message * Removed: logger * Updated: logout initial state Co-authored-by: Llewellyn D'souza <lledsouza2209@gmail.com> Jira ticket ref: WMS-27
This commit is contained in:
@@ -49,9 +49,12 @@ export const onLoginFailure = (state, { error }) =>
|
||||
error: { ...state.error, [error?.loader]: error?.error }
|
||||
});
|
||||
|
||||
export const onLogout = () => INITIAL_STATE;
|
||||
|
||||
/* ------------- Hookup Reducers To Types ------------- */
|
||||
export const authReducer = createReducer(INITIAL_STATE, {
|
||||
[Types.LOGIN_REQUEST]: onLoginRequest,
|
||||
[Types.LOGIN_SUCCESS]: onLoginSuccess,
|
||||
[Types.LOGIN_FAILURE]: onLoginFailure
|
||||
[Types.LOGIN_FAILURE]: onLoginFailure,
|
||||
[Types.LOGOUT]: onLogout
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user