🚧 still working on query params
Co-authored-by: Sindre Kjelsrud <kjelsrudsindre@gmail.com>
This commit is contained in:
parent
a87cfe4d7b
commit
cc2979bace
3 changed files with 41 additions and 25 deletions
|
|
@ -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])
|
||||
|
|
|
|||
Reference in a new issue