mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-06-03 05:34:23 -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>;
|
parser: z.ZodType<T, z.ZodTypeDef, any>;
|
||||||
path: (string | undefined)[];
|
path: (string | undefined)[];
|
||||||
params?: { [query: string]: boolean | number | string | 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.
|
* 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> & {
|
export type QueryPage<Props = {}> = ComponentType<Props> & {
|
||||||
getFetchUrls?: (route: { [key: string]: string }) => QueryIdentifier[];
|
getFetchUrls?: (route: { [key: string]: string }) => QueryIdentifier<any>[];
|
||||||
getLayout?:
|
getLayout?:
|
||||||
| QueryPage<{ page: ReactElement }>
|
| QueryPage<{ page: ReactElement }>
|
||||||
| { Layout: QueryPage<{ page: ReactElement }>; props: object };
|
| { Layout: QueryPage<{ page: ReactElement }>; props: object };
|
||||||
|
@ -123,7 +123,7 @@ export const EpisodeList = <Props,>({
|
|||||||
headerProps={headerProps}
|
headerProps={headerProps}
|
||||||
>
|
>
|
||||||
{(item) => {
|
{(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 (
|
return (
|
||||||
<>
|
<>
|
||||||
{item.firstOfSeason && (
|
{item.firstOfSeason && (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user