"use client"; import { motion } from "motion/react"; import { TitleCard } from "@/components/title-card"; interface TitleRowItem { tmdbId: number; type: "movie" | "tv"; title: string; posterPath: string | null; releaseDate: string | null; voteAverage: number; } interface TitleRowProps { heading: string; icon: React.ReactNode; items: TitleRowItem[]; } const staggerContainer = { hidden: {}, visible: { transition: { staggerChildren: 0.05 } }, }; const staggerItem = { hidden: { opacity: 0, y: 12, scale: 0.98 }, visible: { opacity: 1, y: 0, scale: 1, transition: { type: "spring" as const, stiffness: 300, damping: 24 }, }, }; export function TitleRow({ heading, icon, items }: TitleRowProps) { if (items.length === 0) return null; return (
{icon}

{heading}

{items.map((item) => ( ))}
); }