aboutsummaryrefslogtreecommitdiff
path: root/src/containers
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-08-29 15:34:17 +0300
committereug-vs <eug-vs@keemail.me>2020-08-29 15:34:17 +0300
commitb7aed6ed7df2cea67924d34154671afb75edb7c2 (patch)
tree2809cbbc410959d7413919b554c09b3b96491de9 /src/containers
parent9ec578406ad78f3ded1332ecd331c89c32059784 (diff)
downloadwhich-ui-b7aed6ed7df2cea67924d34154671afb75edb7c2.tar.gz
fix: resovle eslint errors
Diffstat (limited to 'src/containers')
-rw-r--r--src/containers/Login/Login.tsx9
-rw-r--r--src/containers/Registration/Registration.tsx8
2 files changed, 6 insertions, 11 deletions
diff --git a/src/containers/Login/Login.tsx b/src/containers/Login/Login.tsx
index 9814d01..3d58c63 100644
--- a/src/containers/Login/Login.tsx
+++ b/src/containers/Login/Login.tsx
@@ -53,7 +53,6 @@ const Login: React.FC = () => {
const history = useHistory();
const handleSubmit = async ({ username, password, remember }: Fields) => {
- console.log({ username, password, remember })
if (username && password) {
login(username, password, remember).then(success => {
if (success) history.push(`/profile/${username}`);
@@ -76,7 +75,7 @@ const Login: React.FC = () => {
initialValues={{ username: '', password: '', remember: true }}
onSubmit={handleSubmit}
>
- {({ values, touched, isSubmitting }) => (
+ {({ values, isSubmitting }) => (
<Form className={classes.root} autoComplete="off">
<Field
name="username"
@@ -96,11 +95,7 @@ const Login: React.FC = () => {
InputProps={{
endAdornment: (
<InputAdornment position="end">
- <IconButton
- size="small"
- aria-label="toggle password visibility"
- onClick={toggleShowPassword}
- >
+ <IconButton size="small" onClick={toggleShowPassword}>
{showPassword ? <Visibility /> : <VisibilityOff />}
</IconButton>
</InputAdornment>
diff --git a/src/containers/Registration/Registration.tsx b/src/containers/Registration/Registration.tsx
index fb2dc8c..a3aedb3 100644
--- a/src/containers/Registration/Registration.tsx
+++ b/src/containers/Registration/Registration.tsx
@@ -28,7 +28,7 @@ const validationSchema = Yup.object({
.required('This field is required'),
password: Yup.string()
.min(6, 'Should be at least 6 characters')
- .required('This field is required'),
+ .required('This field is required')
});
const useStyles = makeStyles(theme => ({
@@ -54,7 +54,7 @@ const useStyles = makeStyles(theme => ({
marginLeft: 10,
color: 'green',
cursor: 'pointer'
- },
+ }
}));
const Registration: React.FC = () => {
@@ -71,7 +71,7 @@ const Registration: React.FC = () => {
post('/users', { username, email, password })
.then(() => login(username, password))
.then(() => history.push(`/profile/${username}`));
- }
+ };
const toggleShowPassword = () => {
setShowPassword(prevState => !prevState);
@@ -118,7 +118,7 @@ const Registration: React.FC = () => {
InputProps={{
endAdornment: (
<InputAdornment position="end">
- <IconButton size="small" onClick={toggleShowPassword} >
+ <IconButton size="small" onClick={toggleShowPassword}>
{showPassword ? <Visibility /> : <VisibilityOff />}
</IconButton>
</InputAdornment>