Help is on the way! To mark it as solved, use the /solve command. In the meantime, here are some existing threads that may help you:
#nextPage returned as string breaks Pagination
1 messages · Page 1 of 1 (latest)
{
docs: [
{
id: 3,
name: 'Third product',
price: 99.99,
url: 'https:/google.com',
poster: [Object],
description: 'Third product Description',
categories: [Array],
featured: true,
slug: 'third-product',
updatedAt: '2024-09-05T13:09:17.050Z',
createdAt: '2024-09-05T13:09:17.050Z'
}
],
hasNextPage: true,
hasPrevPage: false,
limit: 1,
nextPage: '11',
page: '1',
pagingCounter: 1,
prevPage: null,
totalDocs: 3,
totalPages: 3
}
I'm using 3.0.0-beta.90 and the default Pagination component from https://github.com/payloadcms/payload/blob/v3.0.0-beta.90/templates/website/src/app/components/Pagination/index.tsx
And this is the second product:
{
docs: [
{
id: 2,
name: 'Second Product',
price: 19.99,
url: 'https://amazon.com/',
poster: [Object],
description: 'Second Product Description',
categories: [Array],
featured: true,
slug: 'second-product',
updatedAt: '2024-09-04T14:21:27.357Z',
createdAt: '2024-09-04T14:21:27.357Z'
}
],
hasNextPage: true,
hasPrevPage: true,
limit: 1,
nextPage: '21',
page: '2',
pagingCounter: 2,
prevPage: 1,
totalDocs: 3,
totalPages: 3
}