Skip to content

Commit

Permalink
Merge pull request #124 from nupamore/dev
Browse files Browse the repository at this point in the history
Fix infiniteQuery page offset
  • Loading branch information
P-man2976 authored Nov 16, 2023
2 parents 6daa4e1 + d5442b8 commit ed56f24
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/modules/services/channels.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function useChannelListForOrg(
},
{
getNextPageParam: (lastPage, pages) =>
lastPage.length === 100 ? pages.length + 1 : null,
lastPage.length === 100 ? pages.length : null,
keepPreviousData: true,
retry: 1,
cacheTime: 1000 * 60 * 60 * 5,
Expand Down
4 changes: 2 additions & 2 deletions src/modules/services/discovery.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export function useAllPlaylistDiscoveryForOrg(
{
...options,
getNextPageParam: (lastPage, pages) =>
lastPage.length === 100 ? pages.length + 1 : null,
lastPage.length === 100 ? pages.length : null,
keepPreviousData: options.keepPreviousData ?? true,
retry: options.retry ?? 1,
cacheTime: options.cacheTime ?? 1000 * 60 * 60 * 5,
Expand Down Expand Up @@ -125,7 +125,7 @@ export function useAllPlaylistDiscoveryForFavorites(
...options,
enabled: isLoggedIn && options.enabled,
getNextPageParam: (lastPage, pages) =>
lastPage.length === 100 ? pages.length + 1 : null,
lastPage.length === 100 ? pages.length : null,
keepPreviousData: options.keepPreviousData ?? true,
retry: options.retry ?? 1,
cacheTime: options.cacheTime ?? 1000 * 60 * 60 * 5,
Expand Down

0 comments on commit ed56f24

Please sign in to comment.