ignore folder

This commit is contained in:
2026-04-21 06:30:48 +07:00
commit ca00b36f19
70 changed files with 3871 additions and 0 deletions

View File

@ -0,0 +1,29 @@
type PaginationProps = {
page: number;
pageSize: number;
total: number;
onChange: (page: number) => void;
};
export default function Pagination({ page, pageSize, total, onChange }: PaginationProps) {
const totalPages = Math.max(1, Math.ceil(total / pageSize));
if (totalPages <= 1) return null;
return (
<div className="d-flex justify-content-center gap-1">
<button className="btn btn-outline-secondary btn-sm" disabled={page <= 1} onClick={() => onChange(page - 1)}>
Prev
</button>
<span className="px-2 d-flex align-items-center">
Page {page} / {totalPages}
</span>
<button
className="btn btn-outline-secondary btn-sm"
disabled={page >= totalPages}
onClick={() => onChange(page + 1)}
>
Next
</button>
</div>
);
}