"use client"; import { motion } from "motion/react"; import Image from "next/image"; import Link from "next/link"; interface TitleCardProps { id?: string; tmdbId: number; type: string; title: string; posterPath: string | null; releaseDate?: string | null; voteAverage?: number | null; href?: string; onImport?: () => void; } export function TitleCard({ id, type, title, posterPath, releaseDate, voteAverage, href, onImport, }: TitleCardProps) { const year = releaseDate?.slice(0, 4); const content = (
{posterPath ? ( {title} ) : (

{title}

)} {/* Hover gradient overlay with metadata */}

{title}

{type} {year && {year}} {voteAverage != null && voteAverage > 0 && ( ★ {voteAverage.toFixed(1)} )}
); if (href || id) { return {content}; } if (onImport) { return ( ); } return content; }