diff --git a/components/Movie/Card.tsx b/components/Movie/Card.tsx index f5486a1..faf0c93 100644 --- a/components/Movie/Card.tsx +++ b/components/Movie/Card.tsx @@ -1,4 +1,5 @@ import { FC, ReactNode } from 'react'; +import { motion } from 'framer-motion'; import Poster from '@/components/Movie/components/Poster'; import Rating from '@/components/Movie/components/Rating'; @@ -8,14 +9,17 @@ interface Props { movie?: Movie; className?: string; children?: ReactNode; + onClick?: () => void; } -const Card: FC = ({ movie, className, children }) => { +const Card: FC = ({ movie, className, children, onClick }) => { if (!movie) return null; return ( -
-
+
+ {children}
@@ -30,9 +34,9 @@ const Card: FC = ({ movie, className, children }) => {
-
- -
+ +
+
); diff --git a/components/Movie/List.tsx b/components/Movie/List.tsx index 03d131c..324a21a 100644 --- a/components/Movie/List.tsx +++ b/components/Movie/List.tsx @@ -59,9 +59,8 @@ const List: FC = ({ pages, hasNextPage, fetchNextPage, withBottomGap = tr {pages.map((page) => ( @@ -70,10 +69,9 @@ const List: FC = ({ pages, hasNextPage, fetchNextPage, withBottomGap = tr key={movie.id} variants={item} className='flex basis-[300px] cursor-pointer' - onTap={() => setMovie(movie)} ref={array.length / 2 !== index ? undefined : (element) => setLoader(element!)} > - + setMovie(movie)} /> ))} diff --git a/components/ui/dialog.tsx b/components/ui/dialog.tsx index c7c4ab4..8aa7932 100644 --- a/components/ui/dialog.tsx +++ b/components/ui/dialog.tsx @@ -48,11 +48,11 @@ const DialogContent = React.forwardRef< animate={{ top: '20vh' }} exit={{ top: '100vh' }} drag='y' - dragConstraints={{ top: 0, bottom: 300 }} + dragConstraints={{ top: 0, bottom: 0 }} onDragEnd={(_, info) => info.offset.y > 100 && props.onClose?.()} dragListener={false} dragControls={controls} - dragElastic={0.5} + dragElastic={0.8} >