Fix linting

This commit is contained in:
Chen-I Lim 2020-11-12 17:34:52 -08:00
parent adf1ca81bd
commit 286dfd67bb
2 changed files with 12 additions and 11 deletions

View file

@ -79,7 +79,7 @@ class CommentsList extends React.Component<Props, State> {
text={this.state.newComment} text={this.state.newComment}
placeholderText={intl.formatMessage({id: 'CardDetail.new-comment-placeholder', defaultMessage: 'Add a comment...'})} placeholderText={intl.formatMessage({id: 'CardDetail.new-comment-placeholder', defaultMessage: 'Add a comment...'})}
onChange={(value: string) => { onChange={(value: string) => {
if (this.state.newComment != value) { if (this.state.newComment !== value) {
this.setState({newComment: value}) this.setState({newComment: value})
} }
}} }}

View file

@ -8,20 +8,21 @@ import Button from '../widgets/buttons/button'
import './loginPage.scss' import './loginPage.scss'
type Props = {} type Props = {
type State = {
username: string;
password: string;
} }
export default class LoginPage extends React.Component<Props, State> { type State = {
username: string
password: string
}
export default class LoginPage extends React.PureComponent<Props, State> {
state = { state = {
username: '', username: '',
password: '', password: '',
} }
handleLogin = () => { private handleLogin = (): void => {
Utils.log('Logging in') Utils.log('Logging in')
} }
@ -29,7 +30,7 @@ export default class LoginPage extends React.Component<Props, State> {
return ( return (
<div className='LoginPage'> <div className='LoginPage'>
<div className='username'> <div className='username'>
<label htmlFor='login-username'>Username</label> <label htmlFor='login-username'>{'Username'}</label>
<input <input
id='login-username' id='login-username'
value={this.state.username} value={this.state.username}
@ -37,7 +38,7 @@ export default class LoginPage extends React.Component<Props, State> {
/> />
</div> </div>
<div className='password'> <div className='password'>
<label htmlFor='login-username'>Password</label> <label htmlFor='login-username'>{'Password'}</label>
<input <input
id='login-password' id='login-password'
type='password' type='password'
@ -45,7 +46,7 @@ export default class LoginPage extends React.Component<Props, State> {
onChange={(e) => this.setState({password: e.target.value})} onChange={(e) => this.setState({password: e.target.value})}
/> />
</div> </div>
<Button onClick={this.handleLogin}>Login</Button> <Button onClick={this.handleLogin}>{'Login'}</Button>
</div> </div>
) )
} }