Use ES7 class properties initializers
This commit is contained in:
@ -6,13 +6,9 @@ export default class AuthenticationPage extends React.Component {
|
||||
onLogin: React.PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {};
|
||||
this.handleLogin = this.handleLogin.bind(this);
|
||||
}
|
||||
state = {};
|
||||
|
||||
handleLogin(e) {
|
||||
handleLogin = e => {
|
||||
e.preventDefault();
|
||||
let auth;
|
||||
if (document.location.host.split(':')[0] === 'localhost') {
|
||||
@ -28,7 +24,7 @@ export default class AuthenticationPage extends React.Component {
|
||||
}
|
||||
this.props.onLogin(data);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { loginError } = this.state;
|
||||
|
Reference in New Issue
Block a user