From b0f1fba2e5fbde573b46a284285985e63f1a3618 Mon Sep 17 00:00:00 2001 From: Dan Date: Fri, 15 Sep 2017 12:39:34 -0230 Subject: Ensures that new accounts are only created from the modal, and not when clicking 'Create New Account' --- ui/app/components/modals/new-account-modal.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'ui/app/components/modals/new-account-modal.js') diff --git a/ui/app/components/modals/new-account-modal.js b/ui/app/components/modals/new-account-modal.js index 8d67762ac..910f3c0ca 100644 --- a/ui/app/components/modals/new-account-modal.js +++ b/ui/app/components/modals/new-account-modal.js @@ -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', ]), ]), -- cgit