feat: filter can be hidden
This commit is contained in:
1 parent
c42d5a5298
commit
ff506e755c
13 files changed
+73
-83
No files matched your search
@@ -4,15 +4,13 @@ import { useRouter } from 'next/navigation';
|
||||
|
||||
import useTrailer from '@/app/(site)/useTrailer';
|
||||
import Credits from '@/components/Movie/components/Credits';
|
||||
import Poster from '@/components/Movie/components/Poster';
|
||||
import Rating from '@/components/Movie/components/Rating';
|
||||
import Title from '@/components/Movie/components/Title';
|
||||
import Trailer from '@/components/Movie/components/Trailer';
|
||||
import { Separator } from '@/components/ui/separator';
|
||||
|
||||
import { Button } from '../ui/button';
|
||||
|
||||
import Torrents from './components/Torrents';
|
||||
import Card from './Card';
|
||||
|
||||
interface Props {
|
||||
movie?: Movie;
|
||||
@@ -31,15 +29,8 @@ const Preview: FC<Props> = ({ movie, className, onClose }) => {
|
||||
return (
|
||||
<>
|
||||
<div className={`p-3 rounded-xl border bg-card text-card-foreground shadow-sm ${className}`}>
|
||||
<div className='flex flex-col lg:flex-row max-w-[100%] gap-3 overflow-hidden'>
|
||||
<Poster
|
||||
className='max-w-[300px]'
|
||||
title={movie.title}
|
||||
width={300}
|
||||
height={450}
|
||||
size={100}
|
||||
poster={movie.poster_path}
|
||||
>
|
||||
<div className='flex flex-col lg:flex-row max-w-[100%] gap-3'>
|
||||
<Card movie={movie} className='max-w-[300px] min-w-[300px] mx-auto w-full'>
|
||||
{trailer && (
|
||||
<div
|
||||
onClick={() => setIsShowTrailer(true)}
|
||||
@@ -49,24 +40,9 @@ const Preview: FC<Props> = ({ movie, className, onClose }) => {
|
||||
<Play size={100} className='fill-white' />
|
||||
</div>
|
||||
)}
|
||||
</Poster>
|
||||
</Card>
|
||||
<div className='flex flex-col grow'>
|
||||
<div className='flex'>
|
||||
<div className='flex flex-row flex-wrap w-full text-lg font-semibold'>
|
||||
<span className='flex w-full items-center'>
|
||||
<span className='mr-2 w-full'>
|
||||
<Title title={movie.title} />
|
||||
</span>
|
||||
{movie.release_date && <span className='ml-auto'>{new Date(movie.release_date).getFullYear()}</span>}
|
||||
</span>
|
||||
<Rating movie={movie} />
|
||||
</div>
|
||||
</div>
|
||||
<Separator className='my-2' />
|
||||
<div className='flex flex-col items-start grow justify-between'>
|
||||
<p className='leading-7'>{movie.overview}</p>
|
||||
</div>
|
||||
<div className='flex w-full mt-2 gap-2'>
|
||||
<div className='flex w-full gap-2'>
|
||||
<Button className='h-8 grow' onClick={() => setIsShowTorrents(true)}>
|
||||
Torrents
|
||||
</Button>
|
||||
@@ -80,6 +56,8 @@ const Preview: FC<Props> = ({ movie, className, onClose }) => {
|
||||
Similar
|
||||
</Button>
|
||||
</div>
|
||||
<Separator className='my-2' />
|
||||
<p className='leading-7'>{movie.overview}</p>
|
||||
</div>
|
||||
</div>
|
||||
<Credits movieId={movie.id} onPersonClick={() => onClose?.()} />
|
||||
|
||||
Reference in new issue
Block a user