251127:1700 Frontend Start Build
This commit is contained in:
30
frontend/.ignored_node_modules/@tanstack/react-query/src/usePrefetchInfiniteQuery.tsx
generated
Normal file
30
frontend/.ignored_node_modules/@tanstack/react-query/src/usePrefetchInfiniteQuery.tsx
generated
Normal file
@@ -0,0 +1,30 @@
|
||||
import { useQueryClient } from './QueryClientProvider'
|
||||
import type {
|
||||
DefaultError,
|
||||
FetchInfiniteQueryOptions,
|
||||
QueryClient,
|
||||
QueryKey,
|
||||
} from '@tanstack/query-core'
|
||||
|
||||
export function usePrefetchInfiniteQuery<
|
||||
TQueryFnData = unknown,
|
||||
TError = DefaultError,
|
||||
TData = TQueryFnData,
|
||||
TQueryKey extends QueryKey = QueryKey,
|
||||
TPageParam = unknown,
|
||||
>(
|
||||
options: FetchInfiniteQueryOptions<
|
||||
TQueryFnData,
|
||||
TError,
|
||||
TData,
|
||||
TQueryKey,
|
||||
TPageParam
|
||||
>,
|
||||
queryClient?: QueryClient,
|
||||
) {
|
||||
const client = useQueryClient(queryClient)
|
||||
|
||||
if (!client.getQueryState(options.queryKey)) {
|
||||
client.prefetchInfiniteQuery(options)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user