fix: handle error.

This commit is contained in:
elforjani13
2021-11-08 14:54:11 +02:00
parent 6d67d6163d
commit adc6b336e0
7 changed files with 30 additions and 7 deletions

View File

@@ -42,7 +42,10 @@ function NotifyInvoiceViaSMSForm({
data: { errors },
},
}) => {
transformErrors(errors);
if (errors) {
transformErrors(errors, { setErrors });
}
setSubmitting(false);
};
createNotifyInvoiceBySMSMutate([invoiceId, values])
.then(onSuccess)