🚧 still working on query params

Co-authored-by: Sindre Kjelsrud <kjelsrudsindre@gmail.com>
This commit is contained in:
haraldnilsen 2023-09-11 13:26:43 +02:00
parent a87cfe4d7b
commit cc2979bace
3 changed files with 41 additions and 25 deletions

View file

@ -23,7 +23,7 @@ const Pagination: React.FC<PaginationProps> = ({
setShowRightDots(currentPage < totalPages - 3 ? true : false)
}
if (!showLeftDots && !showRightDots) {
setShowingNumbers(Array.from(Array(totalPages).keys()))
setShowingNumbers(Array.from(Array(totalPages).keys()).map((n) => n + 1))
}
if (!showLeftDots && showRightDots) {
setShowingNumbers([1, 2, 3, 4, 5])