diff --git a/.changeset/shiny-waves-buy.md b/.changeset/shiny-waves-buy.md new file mode 100644 index 000000000..00cae9a78 --- /dev/null +++ b/.changeset/shiny-waves-buy.md @@ -0,0 +1,5 @@ +--- +"@supabase-cache-helpers/postgrest-swr": patch +--- + +fix: use correct return type for cursor hook diff --git a/packages/postgrest-swr/src/query/use-cursor-infinite-scroll-query.ts b/packages/postgrest-swr/src/query/use-cursor-infinite-scroll-query.ts index 0da12d9d3..1323c682c 100644 --- a/packages/postgrest-swr/src/query/use-cursor-infinite-scroll-query.ts +++ b/packages/postgrest-swr/src/query/use-cursor-infinite-scroll-query.ts @@ -1,7 +1,6 @@ import { createCursorKeyGetter, decode, infiniteMiddleware } from '../lib'; import { parseOrderBy } from '../lib/parse-order-by'; import { - type PostgrestPaginationCacheData, type PostgrestPaginationResponse, createCursorPaginationFetcher, decodeObject, @@ -21,7 +20,7 @@ import useSWRInfinite, { } from 'swr/infinite'; export type SWRCursorInfiniteScrollPostgrestResponse = Omit< - SWRInfiniteResponse, PostgrestError>, + SWRInfiniteResponse, PostgrestError>, 'data' > & { loadMore: null | (() => void);