feat(people): unify person detail page for DB and TMDB sources
- Merge PersonDetailsPage and PersonTmdbRedirectPage into one component - /people/:id fetches from local DB with favorite toggle - /people/tmdb/:tmdbId fetches from TMDB with "Add to Library" button - Add TMDB external link in person metadata - Fix CastList links for TMDB preview cast (use /people/tmdb/:tmdbId) - Replace 11MB getAll() with server-side paginated infinite scroll - Add useLocalPeopleInfinite hook and PaginatedPeopleResponse type
This commit is contained in:
1 parent
6d676d803c
commit
db6da6782f
6 files changed
+231
-59
No files matched your search
@@ -33,9 +33,14 @@ function CastCard({ credit }: { credit: Credit }) {
|
||||
? getProfileUrl(credit.people.profile_path)
|
||||
: undefined;
|
||||
|
||||
// For local DB credits, link to /people/:id. For TMDB preview credits (no entry_id), link via tmdb_id.
|
||||
const personLink = credit.entry_id
|
||||
? `/people/${credit.people_id}`
|
||||
: `/people/tmdb/${credit.people?.tmdb_id ?? credit.people_id}`;
|
||||
|
||||
return (
|
||||
<Link
|
||||
to={`/people/${credit.people_id}`}
|
||||
to={personLink}
|
||||
className="flex w-28 shrink-0 flex-col items-center gap-2 text-center"
|
||||
>
|
||||
<Avatar className="h-20 w-20">
|
||||
|
||||
Reference in new issue
Block a user