diff --git a/components/Pagination/Pagination.tsx b/components/Pagination/Pagination.tsx index 77b281b6f..0fb32cb62 100644 --- a/components/Pagination/Pagination.tsx +++ b/components/Pagination/Pagination.tsx @@ -1,43 +1,50 @@ -import React, { useEffect } from 'react'; -import { useTheme } from 'next-themes'; -import clsx from 'clsx'; +import React, { useEffect } from 'react' +import { useTheme } from 'next-themes' +import clsx from 'clsx' type PaginationProps = { - totalPages: number[] | null; - currentPage: number; - handlePageChange: (page: number) => void; -}; + toporbottom: boolean + totalPages: number[] | null + currentPage: number + handlePageChange: (page: number) => void +} export default function Pagination({ + toporbottom, totalPages, currentPage, handlePageChange, }: PaginationProps) { - const { resolvedTheme } = useTheme(); - const isDarkMode = resolvedTheme === 'dark'; - + const { resolvedTheme } = useTheme() + const isDarkMode = resolvedTheme === 'dark' const scrollToTop = () => { - window.scrollTo({ top: 0, behavior: 'smooth' }); - }; + window.scrollTo({ top: 0, behavior: 'smooth' }) + } const changePage = (page: number) => { - handlePageChange(page); - }; + handlePageChange(page) + } useEffect(() => { - scrollToTop(); - }, [currentPage]); + scrollToTop() + }, [currentPage]) return ( <> {totalPages && totalPages.length > 1 && (