mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2025-07-15 02:33:50 +08:00
[resumes][fix] search and pagination bugs (#419)
This commit is contained in:
@ -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 />);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user