fix(ui): fix incorrect login error

This commit is contained in:
nick-delirium 2023-01-10 17:28:37 +01:00
parent 2ec63b1591
commit 269ea69206

View file

@ -71,10 +71,10 @@ const reducer = (state = initialState, action = {}) => {
return state.set('authDetails', action.data);
case UPDATE_PASSWORD.FAILURE:
return state.set('passwordErrors', List(action.errors))
case FETCH_ACCOUNT.FAILURE:
case LOGIN.FAILURE:
deleteCookie('jwt', '/', 'openreplay.com')
return state.set('loginRequest', { loading: false, errors: ['Invalid username or password'] });
case FETCH_ACCOUNT.FAILURE:
case DELETE.SUCCESS:
case DELETE.FAILURE:
deleteCookie('jwt', '/', 'openreplay.com')