import { Link } from 'react-router-dom'; import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'; import { ScrollArea, ScrollBar } from '@/components/ui/scroll-area'; import { getProfileUrl } from '@/lib/media-utils'; import type { Credit } from '@/types'; interface CastListProps { credits: Credit[]; } export function CastList({ credits }: CastListProps) { const castCredits = credits.filter((c) => c.cast_type === 'cast'); if (castCredits.length === 0) return null; return (

Cast

{castCredits.map((credit) => ( ))}
); } function CastCard({ credit }: { credit: Credit }) { const profileUrl = credit.people?.profile_path ? getProfileUrl(credit.people.profile_path) : undefined; return ( {credit.people?.name ?.split(' ') .map((n) => n[0]) .join('')}

{credit.people?.name}

{credit.character}

); }