feat: handle error message.

This commit is contained in:
elforjani13
2021-12-07 20:56:54 +02:00
parent 78c42acb17
commit 14f33c667b
3 changed files with 45 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ import withAlertActions from 'containers/Alert/withAlertActions';
import withDrawerActions from 'containers/Drawer/withDrawerActions';
import { useDeleteCreditNote } from 'hooks/query';
import { handleDeleteErrors } from '../../Sales/CreditNotes/CreditNotesLanding/utils';
import { compose } from 'utils';
/**
@@ -48,7 +49,9 @@ function CreditNoteDeleteAlert({
response: {
data: { errors },
},
}) => {},
}) => {
handleDeleteErrors(errors);
},
)
.finally(() => {
closeAlert(name);