diff --git a/ui/app/pages/create-account/connect-hardware/index.js b/ui/app/pages/create-account/connect-hardware/index.js index ff8506142..351699e8a 100644 --- a/ui/app/pages/create-account/connect-hardware/index.js +++ b/ui/app/pages/create-account/connect-hardware/index.js @@ -1,6 +1,5 @@ -const { Component } = require('react') +import React, { Component } from 'react' const PropTypes = require('prop-types') -const h = require('react-hyperscript') const connect = require('react-redux').connect const actions = require('../../../store/actions') const { getMetaMaskAccounts } = require('../../../selectors/selectors') @@ -176,40 +175,53 @@ class ConnectHardwareForm extends Component { renderError () { return this.state.error - ? h('span.error', { style: { margin: '20px 20px 10px', display: 'block', textAlign: 'center' } }, this.state.error) + ? ( + + {this.state.error} + + ) : null } renderContent () { if (!this.state.accounts.length) { - return h(ConnectScreen, { - connectToHardwareWallet: this.connectToHardwareWallet, - browserSupported: this.state.browserSupported, - }) + return ( + + ) } - return h(AccountList, { - onPathChange: this.onPathChange, - selectedPath: this.props.defaultHdPaths[this.state.device], - device: this.state.device, - accounts: this.state.accounts, - selectedAccount: this.state.selectedAccount, - onAccountChange: this.onAccountChange, - network: this.props.network, - getPage: this.getPage, - history: this.props.history, - onUnlockAccount: this.onUnlockAccount, - onForgetDevice: this.onForgetDevice, - onCancel: this.onCancel, - onAccountRestriction: this.onAccountRestriction, - }) + return ( + + ) } render () { - return h('div', [ - this.renderError(), - this.renderContent(), - ]) + return ( +
+ {this.renderError()} + {this.renderContent()} +
+ ) } }