diff --git a/src/components/quota/QuotaSection.tsx b/src/components/quota/QuotaSection.tsx index 377285c..83c3d93 100644 --- a/src/components/quota/QuotaSection.tsx +++ b/src/components/quota/QuotaSection.tsx @@ -24,6 +24,7 @@ type QuotaSetter = (updater: QuotaUpdater) => void; type ViewMode = 'paged' | 'all'; +const MAX_ITEMS_PER_PAGE = 14; const MAX_SHOW_ALL_THRESHOLD = 30; interface QuotaPaginationState { @@ -153,8 +154,8 @@ export function QuotaSection({ if (effectiveViewMode === 'all') { setPageSize(Math.max(1, filteredFiles.length)); } else { - // Paged mode: 3 rows * columns - setPageSize(columns * 3); + // Paged mode: 3 rows * columns, capped to avoid oversized pages. + setPageSize(Math.min(columns * 3, MAX_ITEMS_PER_PAGE)); } }, [effectiveViewMode, columns, filteredFiles.length, setPageSize]);