Ensures that new accounts are only created from the modal, and not when clicking 'Create New Account'

feature/default_network_editable
Dan 7 years ago committed by Chi Kei Chan
parent feb90f2fc4
commit b0f1fba2e5
  1. 5
      ui/app/components/dropdowns/components/account-dropdowns.js
  2. 8
      ui/app/components/modals/new-account-modal.js
  3. 1
      ui/app/css/itcss/components/modal.scss

@ -162,11 +162,11 @@ class AccountDropdowns extends Component {
DropdownMenuItem,
{
closeMenu: () => {},
onClick: () => actions.addNewAccount(),
style: Object.assign(
{},
menuItemStyles,
),
onClick: () => actions.showNewAccountModal(),
},
[
h(
@ -185,9 +185,6 @@ class AccountDropdowns extends Component {
fontSize: '16px',
lineHeight: '23px',
},
onClick: () => {
actions.showNewAccountModal()
},
}, 'Create Account'),
],
),

@ -19,6 +19,10 @@ function mapDispatchToProps (dispatch) {
hideModal: () => {
dispatch(actions.hideModal())
},
createAccount: () => {
dispatch(actions.addNewAccount())
dispatch(actions.hideModal())
},
}
}
@ -60,7 +64,9 @@ NewAccountModal.prototype.render = function () {
]),
h('div.new-account-modal-content.button', {}, [
h('button.btn-clear', {}, [
h('button.btn-clear', {
onClick: this.props.createAccount
}, [
'SAVE',
]),
]),

@ -284,6 +284,7 @@
top: 25px;
right: 17.5px;
font-family: sans-serif;
cursor: pointer;
}
.new-account-modal-content {

Loading…
Cancel
Save