feat: husky
This commit is contained in:
1 parent
7c6d608239
commit
8cb7fed6ef
7 files changed
+35
-25
No files matched your search
@@ -0,0 +1 @@
|
||||
npm run lint && git add -A .
|
||||
@@ -5,7 +5,7 @@ import getQueryClient from '@/lib/queryClient';
|
||||
|
||||
import Container from './container';
|
||||
|
||||
export default async function Starring({ searchParams }: { searchParams: Record<string, string> }) {
|
||||
const Starring = async ({ searchParams }: { searchParams: Record<string, string> }) => {
|
||||
const queryClient = getQueryClient();
|
||||
|
||||
const { actorId } = searchParams || {};
|
||||
@@ -21,4 +21,6 @@ export default async function Starring({ searchParams }: { searchParams: Record<
|
||||
<Container />
|
||||
</HydrationBoundary>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
export default Starring;
|
||||
@@ -1,19 +0,0 @@
|
||||
import { FC } from 'react';
|
||||
import { ImageOff } from 'lucide-react';
|
||||
|
||||
interface Props {
|
||||
title: string;
|
||||
poster: string;
|
||||
}
|
||||
|
||||
const Poster: FC<Props> = ({ title, poster }) => {
|
||||
return poster ? (
|
||||
<img className='size-full rounded-lg object-cover' src={poster} alt={title} />
|
||||
) : (
|
||||
<div className='flex w-full grow items-center justify-center rounded-lg'>
|
||||
<ImageOff size={100} strokeWidth={1} color='hsl(215.4 16.3% 46.9%)' />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Poster;
|
||||
@@ -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) => {
|
||||
</div>
|
||||
{(!isReady || isLoading) && (
|
||||
<div className='absolute left-0 top-0 size-full'>
|
||||
<img src={backdrop} className='absolute left-0 top-0 size-full' alt={title} />
|
||||
<Image unoptimized src={backdrop} fill className='absolute left-0 top-0 size-full' alt={title} />
|
||||
<div className='absolute left-0 top-0 flex size-full items-center justify-center bg-black/80'>
|
||||
<div className='animate-spin'>
|
||||
<Loader color='white' />
|
||||
|
||||
@@ -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<Props> = ({ show, onClick, className, containerProps }) => {
|
||||
)}
|
||||
>
|
||||
<div className='flex size-full'>
|
||||
<Poster title={show.title} poster={show.poster} />
|
||||
<Image unoptimized className='size-full rounded-lg object-cover' fill src={show.poster} alt={show.title} />
|
||||
</div>
|
||||
<div className='absolute left-0 top-0 flex size-full flex-col justify-between rounded-md bg-vignette p-2 text-white'>
|
||||
<Handlers show={show} onClick={onClick} />
|
||||
|
||||
Generated
+23
@@ -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",
|
||||
|
||||
+3
-1
@@ -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",
|
||||
|
||||
Reference in new issue
Block a user