Skip to content

Commit 58b278b

Browse files
committed
Edit message and simplify code
1 parent 8bd989e commit 58b278b

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/languages/en.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export default {
2626
continue: 'Continue',
2727
firstName: 'First name',
2828
lastName: 'Last name',
29+
phone: 'Phone',
2930
phoneNumber: 'Phone number',
3031
email: 'Email',
3132
and: 'and',

src/languages/es.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export default {
2626
continue: 'Continuar',
2727
firstName: 'Primer nombre',
2828
lastName: 'Apellido',
29+
phone: 'teléfono',
2930
phoneNumber: 'Número de teléfono',
3031
email: 'Email',
3132
and: 'y',

src/pages/signin/ResendValidationForm.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,11 @@ class ResendValidationForm extends React.Component {
8585
}
8686

8787
render() {
88-
const isNewAccount = !this.props.account.accountExists && !this.props.account.validated;
88+
const isNewAccount = !this.props.account.accountExists;
8989
const isOldUnvalidatedAccount = this.props.account.accountExists && !this.props.account.validated;
90-
const login = Str.isSMSLogin(this.props.credentials.login) ? this.props.toLocalPhone(Str.removeSMSDomain(this.props.credentials.login)) : this.props.credentials.login;
91-
const loginType = (Str.isSMSLogin(this.props.credentials.login) ? this.props.translate('common.phoneNumber') : this.props.translate('common.email')).toLowerCase();
90+
const isSMSLogin = Str.isSMSLogin(this.props.credentials.login);
91+
const login = isSMSLogin ? this.props.toLocalPhone(Str.removeSMSDomain(this.props.credentials.login)) : this.props.credentials.login;
92+
const loginType = (isSMSLogin ? this.props.translate('common.phone') : this.props.translate('common.email')).toLowerCase();
9293
let message = '';
9394

9495
if (isNewAccount) {

0 commit comments

Comments
 (0)