"use client" import Image from "next/image" import Link from "next/link" import { posterUrl } from "@/lib/tmdb" import { Film } from "lucide-react" interface MovieCardProps { tmdbId: number title: string posterPath: string | null subtitle?: string size?: "sm" | "md" | "lg" } const sizeClasses = { sm: "w-24 h-36", md: "w-32 h-48", lg: "w-40 h-60", } export function MovieCard({ tmdbId, title, posterPath, subtitle, size = "md", }: MovieCardProps) { const url = posterUrl(posterPath, size === "sm" ? "w185" : "w342") return (
{url ? ( {title} ) : (
)}

{title}

{subtitle && (

{subtitle}

)}
) }