[resumes][fix] search and pagination bugs (#419)

This commit is contained in:
Peirong
2022-10-23 22:37:16 +08:00
committed by GitHub
parent c3d2b4d325
commit b7f4cf93a0
7 changed files with 29 additions and 17 deletions

View File

@ -69,6 +69,7 @@ export default function Pagination({
pageNumberSet.add(page);
elements.push(
<PaginationPage
key={page}
isCurrent={current === page}
label={page}
onClick={(event) => {
@ -83,7 +84,7 @@ export default function Pagination({
addPage(i);
}
if (lastAddedPage < current - pagePadding) {
if (lastAddedPage < current - pagePadding - 1) {
elements.push(<PaginationEllipsis />);
}
@ -91,7 +92,7 @@ export default function Pagination({
addPage(i);
}
if (lastAddedPage < end - pagePadding) {
if (lastAddedPage < end - pagePadding - 1) {
elements.push(<PaginationEllipsis />);
}