aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/pages/create-account/new-account.js
diff options
context:
space:
mode:
authorAlexander Tseung <alextsg@gmail.com>2018-02-01 10:24:20 +0800
committerAlexander Tseung <alextsg@gmail.com>2018-02-01 10:24:20 +0800
commit4f1fe1da6295902e3e0fee633444f84f61f28449 (patch)
treea8e35564ec7963c70cd61868323c202bdc7131dd /ui/app/components/pages/create-account/new-account.js
parent0c6fef3dec4f3ba70e8e86275ee9db4f2d58d129 (diff)
parent78bce55858916ba9d3189f76db440768e6ae95b1 (diff)
downloadtangerine-wallet-browser-4f1fe1da6295902e3e0fee633444f84f61f28449.tar.gz
tangerine-wallet-browser-4f1fe1da6295902e3e0fee633444f84f61f28449.tar.zst
tangerine-wallet-browser-4f1fe1da6295902e3e0fee633444f84f61f28449.zip
Fix merge conflicts from uat-next
Diffstat (limited to 'ui/app/components/pages/create-account/new-account.js')
-rw-r--r--ui/app/components/pages/create-account/new-account.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/ui/app/components/pages/create-account/new-account.js b/ui/app/components/pages/create-account/new-account.js
index a3bfefc84..fbd456a75 100644
--- a/ui/app/components/pages/create-account/new-account.js
+++ b/ui/app/components/pages/create-account/new-account.js
@@ -8,16 +8,18 @@ const { DEFAULT_ROUTE } = require('../../../routes')
class NewAccountCreateForm extends Component {
constructor (props) {
super(props)
+
const { numberOfExistingAccounts = 0 } = props
const newAccountNumber = numberOfExistingAccounts + 1
this.state = {
- newAccountName: `Account ${newAccountNumber}`,
+ newAccountName: '',
+ defaultAccountName: `Account ${newAccountNumber}`,
}
}
render () {
- const { newAccountName } = this.state
+ const { newAccountName, defaultAccountName } = this.state
const { history, createAccount } = this.props
return h('div.new-account-create-form', [
@@ -28,8 +30,8 @@ class NewAccountCreateForm extends Component {
h('div.new-account-create-form__input-wrapper', {}, [
h('input.new-account-create-form__input', {
- value: this.state.newAccountName,
- placeholder: 'E.g. My new account',
+ value: newAccountName,
+ placeholder: defaultAccountName,
onChange: event => this.setState({ newAccountName: event.target.value }),
}, []),
]),
@@ -44,7 +46,7 @@ class NewAccountCreateForm extends Component {
h('button.new-account-create-form__button-create', {
onClick: () => {
- createAccount(newAccountName)
+ createAccount(newAccountName || defaultAccountName)
.then(() => history.push(DEFAULT_ROUTE))
},
}, [