diff --git a/components/Paginator.tsx b/components/Paginator.tsx index a52ed2c..73fb3aa 100644 --- a/components/Paginator.tsx +++ b/components/Paginator.tsx @@ -1,7 +1,6 @@ import Link from 'next/link' - const Paginator = ({ currentPage, totalPage }:PaginatorProps):JSX.Element => { - const pages = [currentPage === 1 ? 2 : currentPage === 2 ? 1 : currentPage - 2, currentPage === 1 || currentPage === 2 ? 3 : currentPage - 1, currentPage, currentPage === 1 || currentPage === 2 ? 4 : currentPage + 1, currentPage === 1 || currentPage === 2 ? 5 : currentPage + 2] + const pages = [1, currentPage - 1, currentPage, currentPage + 1, totalPage ] return