mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Fix types
This commit is contained in:
parent
3d53693e68
commit
91498f45cd
@ -21,16 +21,7 @@
|
||||
import { Page, QueryIdentifier, useInfiniteFetch } from "@kyoo/models";
|
||||
import { useBreakpointMap, HR } from "@kyoo/primitives";
|
||||
import { ContentStyle, FlashList } from "@shopify/flash-list";
|
||||
import {
|
||||
ComponentProps,
|
||||
ComponentType,
|
||||
isValidElement,
|
||||
ReactElement,
|
||||
useCallback,
|
||||
useReducer,
|
||||
useRef,
|
||||
useState,
|
||||
} from "react";
|
||||
import { ComponentProps, ComponentType, isValidElement, ReactElement, useRef } from "react";
|
||||
import { EmptyView, ErrorView, Layout, WithLoading, addHeader } from "./fetch";
|
||||
import { FlatList, View, ViewStyle } from "react-native";
|
||||
|
||||
@ -61,7 +52,7 @@ const emulateGap = (
|
||||
};
|
||||
};
|
||||
|
||||
export const InfiniteFetchList = <Data, Props, _, Kind>({
|
||||
export const InfiniteFetchList = <Data, Props, _, Kind extends number | string>({
|
||||
query,
|
||||
placeholderCount = 2,
|
||||
incremental = false,
|
||||
@ -157,7 +148,7 @@ export const InfiniteFetchList = <Data, Props, _, Kind>({
|
||||
);
|
||||
};
|
||||
|
||||
export const InfiniteFetch = <Data, Props, _, Kind>({
|
||||
export const InfiniteFetch = <Data, Props, _, Kind extends number | string>({
|
||||
query,
|
||||
...props
|
||||
}: {
|
||||
|
@ -139,7 +139,7 @@ const InfiniteScroll = <Props,>({
|
||||
);
|
||||
};
|
||||
|
||||
export const InfiniteFetchList = <Data, _, HeaderProps, Kind>({
|
||||
export const InfiniteFetchList = <Data, _, HeaderProps, Kind extends number | string>({
|
||||
query,
|
||||
incremental = false,
|
||||
placeholderCount = 2,
|
||||
@ -207,7 +207,7 @@ export const InfiniteFetchList = <Data, _, HeaderProps, Kind>({
|
||||
);
|
||||
};
|
||||
|
||||
export const InfiniteFetch = <Data, Props, _, Kind>({
|
||||
export const InfiniteFetch = <Data, Props, _, Kind extends number | string>({
|
||||
query,
|
||||
...props
|
||||
}: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user