From f201b23cfb9ea0c34f3c1d8cd3d75c767ac93dc3 Mon Sep 17 00:00:00 2001 From: Junseo Park Date: Mon, 15 Feb 2021 11:39:00 +0900 Subject: [PATCH] fix: paginator bug close: https://github.com/koreanbots/v2-testing/issues/54 --- components/Paginator.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/Paginator.tsx b/components/Paginator.tsx index c829d9b..d76fcd1 100644 --- a/components/Paginator.tsx +++ b/components/Paginator.tsx @@ -5,7 +5,7 @@ const Paginator = ({ currentPage, totalPage, pathname }:PaginatorProps):JSX.Elem else if(currentPage > totalPage - 3) pages = [ totalPage - 4 < 1 ? null : totalPage - 4, totalPage - 3 < 1 ? null : totalPage - 3, totalPage - 2 < 1 ? null : totalPage - 2, totalPage - 1 < 1 ? null : totalPage - 1, totalPage ] else pages = [ currentPage - 2 < 1 ? null : currentPage - 2, currentPage - 1 < 1 ? null : currentPage - 1, currentPage, currentPage + 1 > totalPage ? null : currentPage + 1, currentPage + 2 > totalPage ? null : currentPage + 2 ] pages = pages.filter(el => el) - return
+ return
@@ -14,7 +14,7 @@ const Paginator = ({ currentPage, totalPage, pathname }:PaginatorProps):JSX.Elem { pages.map((el, i) => - {el} + {el} ) }