mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-30 19:54:16 -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 { Page, QueryIdentifier, useInfiniteFetch } from "@kyoo/models";
|
||||||
import { useBreakpointMap, HR } from "@kyoo/primitives";
|
import { useBreakpointMap, HR } from "@kyoo/primitives";
|
||||||
import { ContentStyle, FlashList } from "@shopify/flash-list";
|
import { ContentStyle, FlashList } from "@shopify/flash-list";
|
||||||
import {
|
import { ComponentProps, ComponentType, isValidElement, ReactElement, useRef } from "react";
|
||||||
ComponentProps,
|
|
||||||
ComponentType,
|
|
||||||
isValidElement,
|
|
||||||
ReactElement,
|
|
||||||
useCallback,
|
|
||||||
useReducer,
|
|
||||||
useRef,
|
|
||||||
useState,
|
|
||||||
} from "react";
|
|
||||||
import { EmptyView, ErrorView, Layout, WithLoading, addHeader } from "./fetch";
|
import { EmptyView, ErrorView, Layout, WithLoading, addHeader } from "./fetch";
|
||||||
import { FlatList, View, ViewStyle } from "react-native";
|
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,
|
query,
|
||||||
placeholderCount = 2,
|
placeholderCount = 2,
|
||||||
incremental = false,
|
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,
|
query,
|
||||||
...props
|
...props
|
||||||
}: {
|
}: {
|
||||||
|
@ -139,7 +139,7 @@ const InfiniteScroll = <Props,>({
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const InfiniteFetchList = <Data, _, HeaderProps, Kind>({
|
export const InfiniteFetchList = <Data, _, HeaderProps, Kind extends number | string>({
|
||||||
query,
|
query,
|
||||||
incremental = false,
|
incremental = false,
|
||||||
placeholderCount = 2,
|
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,
|
query,
|
||||||
...props
|
...props
|
||||||
}: {
|
}: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user