feat(frontend): show seen dates inline on episode cards and fix cast page
- Display all seen dates inline (comma-separated) on episode cards in SeasonPage; remove unused Tooltip imports - Propagate episode_count in normalizeCredit so TV series cast shows X ep. - Add entriesApi.getCredits(id) API method and useEntryCredits(id) hook - Load all credits in EntryCastsPage via useEntryCredits (no more 10-cast limit) - Replace full-list render with IntersectionObserver lazy loader (24 per chunk) - Fix Sort/Filter Select trigger to show human-readable label instead of raw key
This commit is contained in:
1 parent
22d111ef71
commit
5fa2556b43
4 files changed
+92
-17
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import { api } from '@/lib/api';
|
||||
import { normalizeEntry } from '@/lib/normalizers';
|
||||
import type { Entry, TmdbPreview } from '@/types';
|
||||
import { normalizeEntry, normalizeCredit } from '@/lib/normalizers';
|
||||
import type { Entry, Credit, TmdbPreview } from '@/types';
|
||||
|
||||
export const entriesApi = {
|
||||
getAll: () =>
|
||||
@@ -42,6 +42,11 @@ export const entriesApi = {
|
||||
getSeasons: (id: number) =>
|
||||
api.get(`/entries/${id}/seasons`).then((r) => Array.isArray(r.data) ? r.data : []),
|
||||
|
||||
getCredits: (id: number) =>
|
||||
api
|
||||
.get<Credit[]>(`/entries/${id}/credits`)
|
||||
.then((r) => (Array.isArray(r.data) ? r.data.map(normalizeCredit) : [])),
|
||||
|
||||
syncSeries: () => api.get('/entries/sync-series').then((r) => r.data),
|
||||
|
||||
previewTmdb: (tmdbId: number, type: 'movie' | 'tv') =>
|
||||
|
||||
Reference in new issue
Block a user