diff --git a/apps/www/app/(discover)/components/pagination.tsx b/apps/www/app/(discover)/components/pagination.tsx index d412dac..1917f53 100644 --- a/apps/www/app/(discover)/components/pagination.tsx +++ b/apps/www/app/(discover)/components/pagination.tsx @@ -49,6 +49,11 @@ export function Pagination({ currentPage, totalPages, onPageChange, itemsPerPage return pages } + const handlePageChange = (page: number) => { + onPageChange(page) + window.scrollTo({ top: 0, behavior: 'smooth' }) + } + const startItem = (currentPage - 1) * itemsPerPage + 1 const endItem = Math.min(currentPage * itemsPerPage, totalItems) @@ -77,7 +82,7 @@ export function Pagination({ currentPage, totalPages, onPageChange, itemsPerPage {totalPages > 1 && (