fix: clear loading state if consent or logon received

This commit is contained in:
Benedikt Kulmann
2022-10-25 14:53:00 +02:00
parent 51c16e41be
commit b3225a0dc9

View File

@@ -32,13 +32,10 @@ function loginReducer(state = {
case RECEIVE_CONSENT:
case RECEIVE_LOGON:
if (!action.success) {
return Object.assign({}, state, {
errors: action.errors ? action.errors : {},
loading: ''
});
}
return state;
return Object.assign({}, state, {
errors: !action.success && action.errors ? action.errors : {},
loading: ''
});
case RECEIVE_LOGOFF:
return Object.assign({}, state, {