delete buttonsDisabled boolean

feature/default_network_editable
Erik Marks 5 years ago
parent 567b5634ca
commit 0de56203fc
  1. 20
      ui/app/pages/permissions-connect/choose-account/choose-account.component.js

@ -30,7 +30,6 @@ export default class ChooseAccount extends Component {
state = {
selectedAccounts: this.props.selectedAccountAddresses,
buttonsDisabled: false,
}
static defaultProps = {
@ -186,7 +185,7 @@ export default class ChooseAccount extends Component {
targetDomainMetadata,
accounts,
} = this.props
const { selectedAccounts, buttonsDisabled } = this.state
const { selectedAccounts } = this.state
const { t } = this.context
return (
<div className="permissions-connect-choose-account">
@ -205,26 +204,15 @@ export default class ChooseAccount extends Component {
<PermissionsConnectFooter />
<div className="permissions-connect-choose-account__bottom-buttons">
<Button
onClick={() => {
cancelPermissionsRequest(permissionsRequestId)
this.setState({
buttonsDisabled: true,
})
}}
onClick={() => cancelPermissionsRequest(permissionsRequestId)}
type="default"
disabled={buttonsDisabled}
>
{t('cancel')}
</Button>
<Button
onClick={() => {
selectAccounts(selectedAccounts)
this.setState({
buttonsDisabled: true,
})
}}
onClick={() => selectAccounts(selectedAccounts)}
type="primary"
disabled={selectedAccounts.size === 0 || buttonsDisabled}
disabled={selectedAccounts.size === 0}
>
{t('next')}
</Button>

Loading…
Cancel
Save