Improvment in tslint standard (#16)
This commit is contained in:
@@ -20,7 +20,7 @@ export class Login extends Component {
|
||||
* @param {object} props is an object properties of component
|
||||
*/
|
||||
constructor(props) {
|
||||
super(props);
|
||||
super(props)
|
||||
|
||||
this.state = {
|
||||
emailInput: '',
|
||||
@@ -40,12 +40,12 @@ export class Login extends Component {
|
||||
* @param {event} evt is an event of inputs of element on change
|
||||
*/
|
||||
handleInputChange = (evt) => {
|
||||
const target = evt.target;
|
||||
const value = target.type === 'checkbox' ? target.checked : target.value;
|
||||
const name = target.name;
|
||||
const target = evt.target
|
||||
const value = target.type === 'checkbox' ? target.checked : target.value
|
||||
const name = target.name
|
||||
this.setState({
|
||||
[name]: value
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
switch (name) {
|
||||
@@ -60,7 +60,7 @@ export class Login extends Component {
|
||||
passwordInputError: ''
|
||||
})
|
||||
|
||||
break;
|
||||
break
|
||||
default:
|
||||
|
||||
}
|
||||
@@ -71,7 +71,7 @@ export class Login extends Component {
|
||||
*/
|
||||
handleForm = () => {
|
||||
|
||||
var error = false
|
||||
let error = false
|
||||
if (this.state.emailInput === '') {
|
||||
this.setState({
|
||||
emailInputError: 'This field is required'
|
||||
@@ -110,7 +110,7 @@ export class Login extends Component {
|
||||
textAlign: 'center',
|
||||
display: 'block',
|
||||
margin: "auto"
|
||||
};
|
||||
}
|
||||
return (
|
||||
<form>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user