implemented pagination component

Co-authored-by: Sindre Kjelsrud <kjelsrudsindre@gmail.com>
This commit is contained in:
haraldnilsen 2023-09-04 15:49:18 +02:00
parent 596e07bbf9
commit dcf43ec508
3 changed files with 35 additions and 8 deletions

View file

@ -26,6 +26,10 @@ function App() {
return Math.round(totalResults / 10)
}
const handlePageChange = (pageNumber: number) => {
setCurrentPage(pageNumber)
}
return (
<>
<q.div>
@ -35,6 +39,7 @@ function App() {
<Pagination
currentPage={currentPage}
totalPages={calculatePages(totalPages)}
handlePageChange={handlePageChange}
/>
)}
</q.div>