Merge remote-tracking branch 'origin/feature/react-query' into feature/react-query

This commit is contained in:
a.bouhuolia
2021-02-21 14:22:29 +02:00
4 changed files with 15 additions and 9 deletions

View File

@@ -136,8 +136,10 @@ function ReceiptForm({
};
// Handle the request error.
const onError = (errors) => {
handleErrors(errors, { setErrors });
const onError = ({response:{data:{errors}}}) => {
if(errors){
handleErrors(errors, { setErrors });
}
setSubmitting(false);
};