pageand
limitto the current URL.
https://example.com?page=1&limit=20
<PaginationWithLinks
page={1}
pageSize={20}
totalCount={500}
/>
export default async function Example({ searchParams }) {
const page = parseInt(searchParams.get("page") || "1");
const pageSize = parseInt(searchParams.get("pageSize") || "20");
const [data, count] = await getDataWithCount();
return (
<div>
{/* Other code */}
<PaginationWithLinks
page={page}
pageSize={pageSize}
totalCount={count}
/>
</div>
);
}