diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 0000000..0a37c4e --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +npm run lint && git add -A . diff --git a/app/(site)/starring/page.tsx b/app/(site)/starring/page.tsx index df5a71d..7be0039 100644 --- a/app/(site)/starring/page.tsx +++ b/app/(site)/starring/page.tsx @@ -5,7 +5,7 @@ import getQueryClient from '@/lib/queryClient'; import Container from './container'; -export default async function Starring({ searchParams }: { searchParams: Record }) { +const Starring = async ({ searchParams }: { searchParams: Record }) => { const queryClient = getQueryClient(); const { actorId } = searchParams || {}; @@ -21,4 +21,6 @@ export default async function Starring({ searchParams }: { searchParams: Record< ); -} +}; + +export default Starring; diff --git a/components/Show/components/Poster/index.tsx b/components/Show/components/Poster/index.tsx deleted file mode 100644 index 72f5651..0000000 --- a/components/Show/components/Poster/index.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import { FC } from 'react'; -import { ImageOff } from 'lucide-react'; - -interface Props { - title: string; - poster: string; -} - -const Poster: FC = ({ title, poster }) => { - return poster ? ( - {title} - ) : ( -
- -
- ); -}; - -export default Poster; diff --git a/components/Show/components/Torrents/components/Player/index.tsx b/components/Show/components/Torrents/components/Player/index.tsx index d8a548f..101614d 100644 --- a/components/Show/components/Torrents/components/Player/index.tsx +++ b/components/Show/components/Torrents/components/Player/index.tsx @@ -2,6 +2,7 @@ import { useState } from 'react'; import { create, InstanceProps } from 'react-modal-promise'; import { Loader } from 'lucide-react'; import dynamic from 'next/dynamic'; +import Image from 'next/image'; import { Modal } from '@/components/ui/dialog'; import { useToast } from '@/hooks/useToast'; @@ -46,7 +47,7 @@ const showPlayer = create(({ onResolve, magnet, backdrop, title }: Props) => { {(!isReady || isLoading) && (
- {title} + {title}
diff --git a/components/Show/index.tsx b/components/Show/index.tsx index b690842..94a5e7c 100644 --- a/components/Show/index.tsx +++ b/components/Show/index.tsx @@ -1,6 +1,6 @@ import { DetailedHTMLProps, FC, HTMLAttributes } from 'react'; +import Image from 'next/image'; -import Poster from '@/components/Show/components/Poster'; import Rating from '@/components/Show/components/Rating'; import { cn } from '@/lib/utils'; @@ -26,7 +26,7 @@ const Show: FC = ({ show, onClick, className, containerProps }) => { )} >
- + {show.title}
diff --git a/package-lock.json b/package-lock.json index c77727a..658ef46 100644 --- a/package-lock.json +++ b/package-lock.json @@ -49,6 +49,7 @@ "autoprefixer": "^10.4.14", "eslint-plugin-simple-import-sort": "^10.0.0", "eslint-plugin-tailwindcss": "^3.17.4", + "husky": "^9.1.6", "postcss": "^8.4.27", "prettier": "^3.0.0", "tailwindcss": "^3.3.3", @@ -4477,6 +4478,22 @@ "node": ">=14.18.0" } }, + "node_modules/husky": { + "version": "9.1.6", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.6.tgz", + "integrity": "sha512-sqbjZKK7kf44hfdE94EoX8MZNk0n7HeW37O4YrVGCF4wzgQjp+akPAkfUK5LZ6KuR/6sqeAVuXHji+RzQgOn5A==", + "dev": true, + "license": "MIT", + "bin": { + "husky": "bin.js" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/typicode" + } + }, "node_modules/ignore": { "version": "5.2.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", @@ -9931,6 +9948,12 @@ "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==" }, + "husky": { + "version": "9.1.6", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.6.tgz", + "integrity": "sha512-sqbjZKK7kf44hfdE94EoX8MZNk0n7HeW37O4YrVGCF4wzgQjp+akPAkfUK5LZ6KuR/6sqeAVuXHji+RzQgOn5A==", + "dev": true + }, "ignore": { "version": "5.2.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", diff --git a/package.json b/package.json index a0e5ecb..b564658 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "dev": "next dev", "build": "next build", "start": "next start", - "lint": "next lint --fix ." + "lint": "next lint --fix .", + "prepare": "husky" }, "dependencies": { "@radix-ui/react-dialog": "^1.1.1", @@ -50,6 +51,7 @@ "autoprefixer": "^10.4.14", "eslint-plugin-simple-import-sort": "^10.0.0", "eslint-plugin-tailwindcss": "^3.17.4", + "husky": "^9.1.6", "postcss": "^8.4.27", "prettier": "^3.0.0", "tailwindcss": "^3.3.3",