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

Loading…
Cancel
Save