Rename daco to shownPages
This commit is contained in:
parent
3b80a0602f
commit
0a9c666cff
@ -15,7 +15,9 @@ export function getPaginatorPages({
|
||||
const maxLinksLength = 7
|
||||
const linksAroundActive = 2
|
||||
const totalPages = Math.ceil(totalCount / pageSize)
|
||||
const daco = range(1, totalPages + 1).reduce<(number | typeof Divider)[]>((acc, link) => {
|
||||
const shownPages = range(1, totalPages + 1).reduce<
|
||||
(number | typeof Divider)[]
|
||||
>((acc, link) => {
|
||||
const isFirst = link === 1
|
||||
const isLast = link === totalPages
|
||||
const isPageOnStart = page <= 3 && link < maxLinksLength
|
||||
@ -36,7 +38,7 @@ export function getPaginatorPages({
|
||||
return [...acc, link]
|
||||
}, [])
|
||||
|
||||
return daco
|
||||
return shownPages
|
||||
}
|
||||
|
||||
export function createHref(
|
||||
|
Loading…
Reference in New Issue
Block a user