feat: husky

This commit is contained in:
ner committed 2024-10-16 18:25:10 +03:00
1 parent 7c6d608239
commit 8cb7fed6ef
7 files changed
+35 -25

No files matched your search

@@ -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' />
+2 -2
View File
@@ -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} />