fix bugs.

This commit is contained in:
Ahmed Bouhuolia
2020-04-29 05:11:02 +02:00
parent f4520e4e5c
commit f6c5cae82e
42 changed files with 575 additions and 401 deletions

View File

@@ -21,16 +21,9 @@ export default function login({ form }) {
}).catch((error) => {
const { response } = error;
const { data } = response;
const { errors } = data;
const { errors = [] } = data;
dispatch({type: t.LOGIN_CLEAR_ERRORS});
if (errors){
dispatch({
type: t.LOGIN_FAILURE, errors,
});
}
reject(error);
reject(errors);
});
});
}