Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Show busy indicator on Address forget (#6066) (#6069)
Browse files Browse the repository at this point in the history
* Shw busy indicator on Address forget

* Remove debug logs
  • Loading branch information
arkpar authored Jul 16, 2017
1 parent 54536df commit 4becd27
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/src/ui/ConfirmDialog/confirmDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ export default class ConfirmDialog extends Component {
<Portal
buttons={ [
<Button
disabled={ disabledDeny }
disabled={ disabledDeny || busy }
icon={ iconDeny || <CancelIcon /> }
key='deny'
label={ labelDeny || DEFAULT_NO }
onClick={ onDeny }
/>,
<Button
disabled={ disabledConfirm }
disabled={ disabledConfirm || busy }
icon={ iconConfirm || <CheckIcon /> }
key='confirm'
label={ labelConfirm || DEFAULT_YES }
Expand Down
8 changes: 8 additions & 0 deletions js/src/views/Address/Delete/delete.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,21 @@ class Delete extends Component {
newError: PropTypes.func
};

state = {
isBusy: false
};

render () {
const { account, confirmMessage, visible } = this.props;
const { isBusy } = this.state;

if (!visible) {
return null;
}

return (
<ConfirmDialog
busy={ isBusy }
className={ styles.delete }
title={
<FormattedMessage
Expand Down Expand Up @@ -99,6 +105,8 @@ class Delete extends Component {
const { api, router } = this.context;
const { account, route, newError } = this.props;

this.setState({ isBusy: true });

api.parity
.removeAddress(account.address)
.then(() => {
Expand Down

0 comments on commit 4becd27

Please sign in to comment.