update application table information

This commit is contained in:
2026-04-17 09:47:04 +07:00
parent a366711d12
commit 9824f3b439
6 changed files with 278 additions and 272 deletions

View File

@@ -9,10 +9,7 @@ const Pagination: React.FC<PaginationProps> = ({
totalPages,
onPageChange,
}) => {
const pagesAroundCurrent = Array.from(
{ length: Math.min(3, totalPages) },
(_, i) => i + Math.max(currentPage - 1, 1)
);
const allPages = Array.from({ length: totalPages }, (_, i) => i + 1);
return (
<div className="flex items-center ">
@@ -25,7 +22,7 @@ const Pagination: React.FC<PaginationProps> = ({
</button>
<div className="flex items-center gap-2">
{currentPage > 3 && <span className="px-2">...</span>}
{pagesAroundCurrent.map((page) => (
{allPages.map((page) => (
<button
key={page}
onClick={() => onPageChange(page)}
@@ -40,6 +37,7 @@ const Pagination: React.FC<PaginationProps> = ({
))}
{currentPage < totalPages - 2 && <span className="px-2">...</span>}
</div>
<button
onClick={() => onPageChange(currentPage + 1)}
disabled={currentPage === totalPages}