From fb3084441f98c744aa25ab578e83ac9557d701e5 Mon Sep 17 00:00:00 2001 From: cpride Date: Sun, 19 Jan 2025 20:15:26 -0600 Subject: [PATCH] fix: added optional variable to pagination component --- frontend/src/Components/Pagination.tsx | 8 ++++++-- frontend/src/Pages/VideoManagement.tsx | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/src/Components/Pagination.tsx b/frontend/src/Components/Pagination.tsx index 46260fa9..b6b26fae 100644 --- a/frontend/src/Components/Pagination.tsx +++ b/frontend/src/Components/Pagination.tsx @@ -7,15 +7,19 @@ import { export default function Pagination({ meta, setPage, - setPerPage + setPerPage, + specialPageSelecton }: { meta: PaginationMeta; setPage: (page: number) => void; setPerPage?: (perPage: number) => void; + specialPageSelecton?: boolean; }) { const page = meta.current_page - 1; const perPage = meta.per_page; - const perPageSelections = [10, 20, 50, 100]; + const perPageSelections = specialPageSelecton + ? [12, 24, 60, 120] + : [10, 20, 50, 100]; return (
)}