import { FC } from 'react'; import { Star } from 'lucide-react'; import Poster from '@/components/Movie/components/Poster'; import Rating from '@/components/Movie/components/Rating'; import Title from '@/components/Movie/components/Title'; interface Props { movie?: Movie; className?: string; } const Card: FC = ({ movie, className }) => { if (!movie) return null; return (
{movie.release_date && ( <span className='flex justify-end text-lg font-semibold'> {new Date(movie.release_date).getFullYear()} </span> )} </div> </div> </div> <div className='absolute left-0 bottom-0 w-full bg-gradient-to-t from-black to-transparent h-20 text-white p-3 pb-2 flex flex-col justify-end opacity-80'> <Rating movie={movie} iconsFillColor='fill-white' /> </div> </div> </div> ); }; export default Card;