mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Fix type issues
This commit is contained in:
parent
67deef897f
commit
31d9507033
@ -155,7 +155,7 @@ export type QueryIdentifier<T = unknown, Ret = T> = {
|
||||
parser: z.ZodType<T, z.ZodTypeDef, any>;
|
||||
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<T = unknown, Ret = T> = {
|
||||
};
|
||||
|
||||
export type QueryPage<Props = {}> = ComponentType<Props> & {
|
||||
getFetchUrls?: (route: { [key: string]: string }) => QueryIdentifier[];
|
||||
getFetchUrls?: (route: { [key: string]: string }) => QueryIdentifier<any>[];
|
||||
getLayout?:
|
||||
| QueryPage<{ page: ReactElement }>
|
||||
| { Layout: QueryPage<{ page: ReactElement }>; props: object };
|
||||
|
@ -123,7 +123,7 @@ export const EpisodeList = <Props,>({
|
||||
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 && (
|
||||
|
Loading…
x
Reference in New Issue
Block a user