"use client"; import { IconPlus, IconStar } from "@tabler/icons-react"; import Image from "next/image"; import { useRouter } from "next/navigation"; import { useTransition } from "react"; import { useProgress } from "@/components/navigation-progress"; import { resolveTitle } from "@/lib/actions/titles"; interface HeroBannerProps { tmdbId: number; type: "movie" | "tv"; title: string; overview: string; backdropPath: string | null; voteAverage: number; } export function HeroBanner({ tmdbId, type, title, overview, backdropPath, voteAverage, }: HeroBannerProps) { const router = useRouter(); const progress = useProgress(); const [isPending, startTransition] = useTransition(); function handleNavigate() { if (isPending) return; progress.start(); startTransition(async () => { const id = await resolveTitle(tmdbId, type); if (id) router.push(`/titles/${id}`); }); } return (
{overview}