Fixed pagination of pads (#6406)

This commit is contained in:
SamTV12345 2024-05-24 22:32:03 +02:00 committed by GitHub
parent 27dab95113
commit df3686dcad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -167,10 +167,11 @@ export const PadPage = ()=>{
}}><ChevronLeft/><span>Previous Page</span></button> }}><ChevronLeft/><span>Previous Page</span></button>
<span>{currentPage+1} out of {pages}</span> <span>{currentPage+1} out of {pages}</span>
<button disabled={pages == currentPage+1} onClick={()=>{ <button disabled={pages == currentPage+1} onClick={()=>{
setCurrentPage(currentPage+1) const newCurrentPage = currentPage+1
setCurrentPage(newCurrentPage)
setSearchParams({ setSearchParams({
...searchParams, ...searchParams,
offset: (Number(currentPage)-1)*searchParams.limit offset: (Number(newCurrentPage))*searchParams.limit
}) })
}}><span>Next Page</span><ChevronRight/></button> }}><span>Next Page</span><ChevronRight/></button>
</div> </div>