diff options
author | eug-vs <eug-vs@keemail.me> | 2020-07-05 12:22:38 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-07-05 12:22:38 +0300 |
commit | 202f2ab4209a836e51a57081e5f78e255973c6f1 (patch) | |
tree | e01744e849e380ab188eaa4187793a4c6eb42c9f /src | |
parent | c50c38657e23de012699781f07a51dd7e4199b77 (diff) | |
download | which-ui-202f2ab4209a836e51a57081e5f78e255973c6f1.tar.gz |
style: fix eslint errors
Diffstat (limited to 'src')
-rw-r--r-- | src/components/ReviewCard/ReviewCard.tsx | 2 | ||||
-rw-r--r-- | src/pages/HomePage/HomePage.tsx | 2 | ||||
-rw-r--r-- | src/pages/HomePage/ReviewForm.tsx | 11 |
3 files changed, 7 insertions, 8 deletions
diff --git a/src/components/ReviewCard/ReviewCard.tsx b/src/components/ReviewCard/ReviewCard.tsx index 9c3dd20..97581fc 100644 --- a/src/components/ReviewCard/ReviewCard.tsx +++ b/src/components/ReviewCard/ReviewCard.tsx @@ -6,7 +6,7 @@ import { Typography, Divider } from '@material-ui/core/'; -import { Rating } from '@material-ui/lab' +import { Rating } from '@material-ui/lab'; import { Feedback } from 'which-types'; import UserStrip from '../UserStrip/UserStrip'; diff --git a/src/pages/HomePage/HomePage.tsx b/src/pages/HomePage/HomePage.tsx index 7b04bff..5a33b42 100644 --- a/src/pages/HomePage/HomePage.tsx +++ b/src/pages/HomePage/HomePage.tsx @@ -72,7 +72,7 @@ const HomePage: React.FC = () => { const ReactLink = <Link href="https://reactjs.org/">React</Link>; const FeathersLink = <Link href="https://feathersjs.com">Feathers</Link>; const MUILink = <Link href="https://material-ui.com">Material-UI</Link>; - const EmailLink = <Link href="mailto: eug-vs@keemail.me">eug-vs@keemail.me</Link> + const EmailLink = <Link href="mailto: eug-vs@keemail.me">eug-vs@keemail.me</Link>; const Reviews = ( <div className={classes.reviews}> diff --git a/src/pages/HomePage/ReviewForm.tsx b/src/pages/HomePage/ReviewForm.tsx index 58a61b4..7ad0880 100644 --- a/src/pages/HomePage/ReviewForm.tsx +++ b/src/pages/HomePage/ReviewForm.tsx @@ -1,11 +1,10 @@ -import React, { useState, useRef } from 'react'; +import React, { useState } from 'react'; import { makeStyles } from '@material-ui/core/styles'; import { TextField, Button } from '@material-ui/core'; import { Rating } from '@material-ui/lab'; import { useSnackbar } from 'notistack'; import { post } from '../../requests'; -import { useAuth } from '../../hooks/useAuth'; import { useNavigate } from '../../hooks/useNavigate'; const version = 'v1.0.0'; @@ -38,17 +37,17 @@ const ReviewForm: React.FC = () => { } }; - const handleChange = (event: any): void => { + const handleChange = (event: React.ChangeEvent<HTMLInputElement>): void => { setContents(event.target?.value || ''); }; - const handleChangeRating = (event: any, newScore: any): void => { - setScore(newScore); + const handleChangeRating = (event: React.ChangeEvent<Record<string, unknown>>, newScore: number | null): void => { + setScore(newScore || 0); }; return ( <div className={classes.root}> - <Rating value={score} onChange={handleChangeRating} size="large"/> + <Rating value={score} onChange={handleChangeRating} size="large" /> <TextField value={contents} onChange={handleChange} |