diff --git a/front/packages/models/src/query.tsx b/front/packages/models/src/query.tsx index 78e7f3c7..c8af037c 100644 --- a/front/packages/models/src/query.tsx +++ b/front/packages/models/src/query.tsx @@ -155,7 +155,7 @@ export type QueryIdentifier = { parser: z.ZodType; path: (string | undefined)[]; params?: { [query: string]: boolean | number | string | string[] | undefined }; - infinite?: boolean | { value: true; map?: (x: T[]) => Ret[] }; + infinite?: boolean | { value: true; map?: (x: any[]) => Ret[] }; /** * A custom get next function if the infinite query is not a page. */ @@ -163,7 +163,7 @@ export type QueryIdentifier = { }; export type QueryPage = ComponentType & { - getFetchUrls?: (route: { [key: string]: string }) => QueryIdentifier[]; + getFetchUrls?: (route: { [key: string]: string }) => QueryIdentifier[]; getLayout?: | QueryPage<{ page: ReactElement }> | { Layout: QueryPage<{ page: ReactElement }>; props: object }; diff --git a/front/packages/ui/src/details/season.tsx b/front/packages/ui/src/details/season.tsx index 616ff5a5..1457a0f7 100644 --- a/front/packages/ui/src/details/season.tsx +++ b/front/packages/ui/src/details/season.tsx @@ -123,7 +123,7 @@ export const EpisodeList = ({ headerProps={headerProps} > {(item) => { - const sea = item ? seasons?.find((x) => x.seasonNumber === item.seasonNumber) : null; + const sea = item?.firstOfSeason ? seasons?.find((x) => x.seasonNumber === item.seasonNumber) : null; return ( <> {item.firstOfSeason && (