mirror of
https://github.com/tubearchivist/tubearchivist-frontend.git
synced 2024-11-22 11:50: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>
|
<a key={`${page}`} className="pagination-item" onClick={() => handleSetPageNumber(page)}>{page}</a>
|
||||||
)})
|
)})
|
||||||
}
|
}
|
||||||
{downloads?.paginate?.prev_pages &&
|
{pageNumber != 1 && <span> < </span> }
|
||||||
<span>< </span>
|
|
||||||
}
|
|
||||||
<span> Page {pageNumber}</span>
|
<span> Page {pageNumber}</span>
|
||||||
{downloads?.paginate?.next_pages &&
|
{downloads?.paginate?.last_page && <span> > </span> }
|
||||||
<span> > </span>
|
|
||||||
}
|
|
||||||
{downloads?.paginate?.next_pages &&
|
{downloads?.paginate?.next_pages &&
|
||||||
downloads?.paginate?.next_pages?.map((page) => {
|
downloads?.paginate?.next_pages?.map((page) => {
|
||||||
return (
|
return (
|
||||||
<a key={`${page}`} className="pagination-item" onClick={() => handleSetPageNumber(page)}>{page}</a>
|
<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 &&
|
{downloads?.paginate?.last_page &&
|
||||||
<a className="pagination-item" onClick={() => handleSetPageNumber(downloads?.paginate?.last_page)}> Last ({downloads?.paginate?.last_page}) </a>
|
<a className="pagination-item" onClick={() => handleSetPageNumber(downloads?.paginate?.last_page)}> Last ({downloads?.paginate?.last_page}) </a>
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user