diff --git a/app/components/routes/login.js b/app/components/routes/login.js index 6f0a537..435cbb8 100644 --- a/app/components/routes/login.js +++ b/app/components/routes/login.js @@ -61,7 +61,8 @@ const styles = StyleSheet.create({ }, helpText: { fontSize: 11, - fontStyle: 'italic' + fontStyle: 'italic', + padding: 5, }, text: { color: 'white' @@ -76,15 +77,13 @@ export default class Login extends React.Component { showTokenHelp: false }; this.validate = this.validate.bind(this); - this.updateState = this.updateState.bind(this); + this.textChanged = this.textChanged.bind(this); this.showTokenHelp = this.showTokenHelp.bind(this); this.hideTokenHelp = this.hideTokenHelp.bind(this); } - updateState(key, value) { - let state = this.state; - state[key] = value; - this.setState(state); + textChanged(token) { + this.setState({ token }); } validate() { @@ -127,7 +126,7 @@ export default class Login extends React.Component { this.updateState('token', token)} + onChangeText={this.textChanged} value={this.state.token} onSubmitEditing={this.validate} placeholder="CircleCI Token"