✨ implemented pagination component
Co-authored-by: Sindre Kjelsrud <kjelsrudsindre@gmail.com>
This commit is contained in:
parent
596e07bbf9
commit
dcf43ec508
3 changed files with 35 additions and 8 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Reference in a new issue