diff --git a/js/src/modals/DeleteAccount/deleteAccount.js b/js/src/modals/DeleteAccount/deleteAccount.js index 1c6f48df5..f3bd880c1 100644 --- a/js/src/modals/DeleteAccount/deleteAccount.js +++ b/js/src/modals/DeleteAccount/deleteAccount.js @@ -31,8 +31,8 @@ class DeleteAccount extends Component { static propTypes = { account: PropTypes.object.isRequired, - onClose: PropTypes.func, - newError: PropTypes.func + onClose: PropTypes.func.isRequired, + newError: PropTypes.func.isRequired } state = { @@ -51,7 +51,7 @@ class DeleteAccount extends Component { onDeny={ this.closeDeleteDialog } onConfirm={ this.onDeleteConfirmed }>
- Are you sure you want to remove permanently delete the following account? + Are you sure you want to permanently delete the following account?
{ if (result === true) { router.push('/accounts'); + this.closeDeleteDialog(); } else { newError(new Error('Deletion failed.')); } - - this.closeDeleteDialog(); }) .catch((error) => { console.error('onDeleteConfirmed', error); newError(new Error(`Deletion failed: ${error.message}`)); - this.closeDeleteDialog(); }); }