Skip to content
Source
Sign inSign up
TanStack/query

Fix typo in README.md #30

Mergedtannerlyons(GitHub profile, opens in a new tab)merged 1 commit intomaster fromrefs/pull/30/headmerged by tannerlinsley View on GitHub

Showing 1 changed file with 3 additions and 3 deletions.

x
0 of 1 viewed, 1 left
3 additions and 3 deletionsREADME.mdModified
View file
@@ -441,7 +441,7 @@
({ nextId } = {}) => fetch('/api/projects?cursor=' + (nextId || 0)),
paginated: true,
- getCanFetchMore: (lastPage, allPages) => next.nextId,
+ getCanFetchMore: (lastPage, allPages) => lastPage.nextId,
​
@@ -474,14 +474,14 @@
({ offset } = {}) => fetch('/api/projects?offset=' + (offset || 0)),
paginated: true,
- getCanFetchMore: (lastPage, allPages) => next.nextId,
+ getCanFetchMore: (lastPage, allPages) => lastPage.nextId,
​
const loadMore = async () => {
try {
// Get the last page
- const lastPage = data[data.length - 1]
+ const lastPage = pages[pages.length - 1]
// Get the last item's ID
const lastItemId = lastPage[lastPage.length - 1].id
// Fetch more with the offset ID + 1