diff --git a/spa/src/routes/_app/people.$id.tsx b/spa/src/routes/_app/people.$id.tsx index 6736823..b3dcbde 100644 --- a/spa/src/routes/_app/people.$id.tsx +++ b/spa/src/routes/_app/people.$id.tsx @@ -2,8 +2,8 @@ import { createFileRoute } from "@tanstack/react-router" import { useState } from "react" import { useTranslation } from "react-i18next" import { Calendar, ChevronDown, ExternalLink, Film, Globe, MapPin, User } from "lucide-react" +import { Link } from "@tanstack/react-router" import { BackButton } from "@/components/back-button" -import { MovieCard } from "@/components/movie-card" import { EmptyState } from "@/components/empty-state" import { SwipeTabs } from "@/components/swipe-tabs" import { Badge } from "@/components/ui/badge" @@ -11,7 +11,7 @@ import { Button } from "@/components/ui/button" import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card" import { Separator } from "@/components/ui/separator" import { Skeleton } from "@/components/ui/skeleton" -import { tmdbProfileUrl } from "@/lib/api/client" +import { posterUrl, tmdbProfileUrl } from "@/lib/api/client" import { usePersonCredits } from "@/hooks/use-search" import { useDocumentTitle } from "@/hooks/use-document-title" import { shortDate } from "@/lib/date" @@ -140,47 +140,13 @@ function PersonDetailPage() { - {/* Credits */} + {/* Filmography */} {creditTabs.length > 0 ? ( {(tab) => ( <> - {tab === "cast" && ( -
- {cast.map((c) => ( - - ))} -
- )} - {tab === "crew" && ( -
- {crew.map((c) => ( - - ))} -
- )} + {tab === "cast" && ({ movieId: c.movie_id, title: c.title, year: c.release_year, posterPath: c.poster_path, subtitle: c.character }))} />} + {tab === "crew" && ({ movieId: c.movie_id, title: c.title, year: c.release_year, posterPath: c.poster_path, subtitle: `${c.job}` }))} />} )}
@@ -191,6 +157,37 @@ function PersonDetailPage() { ) } +type FilmStripItem = { + movieId: string + title: string + year?: number + posterPath?: string + subtitle: string +} + +function FilmStrip({ items }: { items: FilmStripItem[] }) { + return ( +
+ {items.map((item, i) => ( + +
+ {item.posterPath ? ( + + ) : ( +
+ +
+ )} +
+

{item.title}

+ {item.year &&

{item.year}

} +

{item.subtitle}

+ + ))} +
+ ) +} + const BIO_COLLAPSE_THRESHOLD = 300 function BiographySection({ text }: { text: string }) {