mirror of
https://github.com/tubearchivist/tubearchivist-frontend.git
synced 2024-12-22 01:40:14 +00:00
Pagination improvments.
This commit is contained in:
parent
d948b3e8e7
commit
bcfd89be02
@ -384,22 +384,15 @@ const Download: NextPage = () => {
|
||||
<a key={`${page}`} className="pagination-item" onClick={() => handleSetPageNumber(page)}>{page}</a>
|
||||
)})
|
||||
}
|
||||
{downloads?.paginate?.prev_pages &&
|
||||
<span>< </span>
|
||||
}
|
||||
{pageNumber != 1 && <span> < </span> }
|
||||
<span> Page {pageNumber}</span>
|
||||
{downloads?.paginate?.next_pages &&
|
||||
<span> > </span>
|
||||
}
|
||||
{downloads?.paginate?.last_page && <span> > </span> }
|
||||
{downloads?.paginate?.next_pages &&
|
||||
downloads?.paginate?.next_pages?.map((page) => {
|
||||
return (
|
||||
<a key={`${page}`} className="pagination-item" onClick={() => handleSetPageNumber(page)}>{page}</a>
|
||||
)})
|
||||
}
|
||||
{downloads?.paginate?.next_pages?.forEach((page) =>
|
||||
<a className="pagination-item" onClick={() => handleSetPageNumber(page)}>{page}</a>
|
||||
)}
|
||||
{downloads?.paginate?.last_page &&
|
||||
<a className="pagination-item" onClick={() => handleSetPageNumber(downloads?.paginate?.last_page)}> Last ({downloads?.paginate?.last_page}) </a>
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user