diff --git a/.prettierrc b/.prettierrc
index fbe0e55..25453e9 100644
--- a/.prettierrc
+++ b/.prettierrc
@@ -1,6 +1,8 @@
{
- "trailingComma": "es5",
- "tabWidth": 2,
- "semi": false,
- "singleQuote": true
-}
\ No newline at end of file
+ "trailingComma": "es5",
+ "tabWidth": 2,
+ "arrowParens": "avoid",
+ "semi": true,
+ "singleQuote": true,
+ "jsxSingleQuote": true
+}
diff --git a/src/components/buttons/ThemeToggler.tsx b/src/components/buttons/ThemeToggler.tsx
index 52f2157..bd9614b 100644
--- a/src/components/buttons/ThemeToggler.tsx
+++ b/src/components/buttons/ThemeToggler.tsx
@@ -17,9 +17,9 @@ const ThemeToggler = (props: Props) => {
return (
@@ -99,7 +99,7 @@ const Basic = ({ data, className }: Props) => {
{formatNumber(data.ranking.position)}
{' '}
@@ -136,7 +136,7 @@ const Basic = ({ data, className }: Props) => {
{data.plot || '-'}
}
- {data.primaryCrew.map((crewType) => (
+ {data.primaryCrew.map(crewType => (
{`${crewType.type.category}: `}
@@ -153,7 +153,7 @@ const Basic = ({ data, className }: Props) => {
))}
- )
-}
+ );
+};
-export default Basic
+export default Basic;
diff --git a/src/components/title/Info.tsx b/src/components/title/Info.tsx
index 8ee9983..12f6d5f 100644
--- a/src/components/title/Info.tsx
+++ b/src/components/title/Info.tsx
@@ -1,5 +1,5 @@
import Link from 'next/link';
-import { NextRouter } from 'next/router';
+import { useRouter } from 'next/router';
import { Info } from '../../interfaces/shared/title';
import { formatMoney, formatTime } from '../../utils/helpers';
@@ -8,10 +8,10 @@ import styles from '../../styles/modules/components/title/info.module.scss';
type Props = {
info: Info;
className: string;
- router: NextRouter;
};
-const Info = ({ info, className, router }: Props) => {
+const Info = ({ info, className }: Props) => {
+ const router = useRouter();
const { titleId } = router.query;
const { boxOffice, details, meta, keywords, technicalSpecs, accolades } =
info;
@@ -20,7 +20,7 @@ const Info = ({ info, className, router }: Props) => {
{meta.infoEpisode && (
- Episode info
+ Episode info
{meta.infoEpisode.numSeason && (
@@ -50,14 +50,14 @@ const Info = ({ info, className, router }: Props) => {
{meta.infoEpisode.prevId && (
- Go to previous episode
+ Go to previous episode
)}
{meta.infoEpisode.nextId && (
- Go to next episode
+ Go to next episode
)}
@@ -66,7 +66,7 @@ const Info = ({ info, className, router }: Props) => {
)}
{meta.infoSeries && (
- Series info
+ Series info
)}
{!!keywords.total && (
- Keywords
+ Keywords
{keywords.list.map(word => (
-
- {word}
+ {word}
))}
@@ -135,7 +135,7 @@ const Info = ({ info, className, router }: Props) => {
)}
{!!Object.keys(details).length && (
- Details
+ Details
{details.releaseDate && (
@@ -156,7 +156,7 @@ const Info = ({ info, className, router }: Props) => {
- {country.text}
+ {country.text}
))}
@@ -168,7 +168,7 @@ const Info = ({ info, className, router }: Props) => {
{details.officialSites.sites.map((site, i) => (
{!!i && ', '}
-
+
{site.name}
@@ -182,7 +182,7 @@ const Info = ({ info, className, router }: Props) => {
{!!i && ', '}
- {lang.text}
+ {lang.text}
))}
@@ -201,7 +201,7 @@ const Info = ({ info, className, router }: Props) => {
{!!i && ', '}
- {loc}
+ {loc}
))}
@@ -214,7 +214,7 @@ const Info = ({ info, className, router }: Props) => {
{!!i && ', '}
- {co.name}
+ {co.name}
))}
@@ -225,7 +225,7 @@ const Info = ({ info, className, router }: Props) => {
)}
{!!Object.keys(boxOffice).length && (
- Box office
+ Box office
{boxOffice.budget && (
@@ -277,7 +277,7 @@ const Info = ({ info, className, router }: Props) => {
)}
{!!Object.keys(technicalSpecs).length && (
- Technical specs
+ Technical specs
{technicalSpecs.runtime && (
@@ -293,7 +293,7 @@ const Info = ({ info, className, router }: Props) => {
{!!i && ', '}
- {color.name}
+ {color.name}
))}
@@ -308,7 +308,7 @@ const Info = ({ info, className, router }: Props) => {
{!!i && ', '}
- {sound.name}
+ {sound.name}
))}
diff --git a/src/components/title/Media.tsx b/src/components/title/Media.tsx
index e2c63ed..c9b44af 100644
--- a/src/components/title/Media.tsx
+++ b/src/components/title/Media.tsx
@@ -1,6 +1,5 @@
import Image from 'next/future/image';
import Link from 'next/link';
-import { NextRouter } from 'next/router';
import { Media } from '../../interfaces/shared/title';
import { getProxiedIMDbImgUrl, modifyIMDbImg } from '../../utils/helpers';
@@ -9,21 +8,20 @@ import styles from '../../styles/modules/components/title/media.module.scss';
type Props = {
className: string;
media: Media;
- router: NextRouter;
};
-const Media = ({ className, media, router }: Props) => {
+const Media = ({ className, media }: Props) => {
return (
{(media.trailer || !!media.videos.total) && (
- Videos
+ Videos
{media.trailer && (
-
+