diff options
| -rw-r--r-- | app/components/Login.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/components/Login.js b/app/components/Login.js index e1a11d2071..d902bba1bc 100644 --- a/app/components/Login.js +++ b/app/components/Login.js @@ -31,6 +31,8 @@ type State = { isActive: boolean, }; +const MIN_ACCOUNT_TOKEN_LENGTH = 10; + export default class Login extends Component<Props, State> { state = { isActive: true, @@ -182,7 +184,7 @@ export default class Login extends Component<Props, State> { _onLogin = () => { const accountToken = this.props.accountToken; - if (accountToken && accountToken.length > 0) { + if (accountToken && accountToken.length >= MIN_ACCOUNT_TOKEN_LENGTH) { this.props.login(accountToken); } }; @@ -278,7 +280,7 @@ export default class Login extends Component<Props, State> { const { accountToken, loginState } = this.props; const classes = [styles.input_arrow]; - if (accountToken && accountToken.length > 0) { + if (accountToken && accountToken.length >= MIN_ACCOUNT_TOKEN_LENGTH) { classes.push(styles.input_arrow__active); } @@ -291,7 +293,7 @@ export default class Login extends Component<Props, State> { _shouldActivateLoginButton() { const { accountToken } = this.props; - return accountToken && accountToken.length > 0; + return accountToken && accountToken.length >= MIN_ACCOUNT_TOKEN_LENGTH; } _shouldEnableAccountInput() { |
