Fixed ESLint errors and warning that could be fixed with eslint --fix

This commit is contained in:
Andrey Okonetchnikov
2016-09-13 15:30:58 +02:00
parent 09841c05e2
commit eb14200643
19 changed files with 48 additions and 48 deletions

View File

@ -14,8 +14,8 @@ export default class AuthenticationPage extends React.Component {
handleLogin(e) {
e.preventDefault();
const {email, password} = this.state;
this.setState({authenticating: true});
const { email, password } = this.state;
this.setState({ authenticating: true });
fetch(`${AuthenticationPage.url}/token`, {
method: 'POST',
body: 'grant_type=client_credentials',
@ -27,18 +27,18 @@ export default class AuthenticationPage extends React.Component {
console.log(response);
if (response.ok) {
return response.json().then((data) => {
this.props.onLogin(Object.assign({email}, data));
this.props.onLogin(Object.assign({ email }, data));
});
}
response.json().then((data) => {
this.setState({loginError: data.msg});
})
})
this.setState({ loginError: data.msg });
});
});
}
handleChange(key) {
return (e) => {
this.setState({[key]: e.target.value});
this.setState({ [key]: e.target.value });
};
}