From dc58e75da48eaa36ee570c411a0f9afd5bf08d05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9B=90=EB=8D=94?= Date: Mon, 25 Jan 2021 21:45:04 +0900 Subject: [PATCH] fix: pagiantor bug --- components/Paginator.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Paginator.tsx b/components/Paginator.tsx index 73fb3aa..87f2450 100644 --- a/components/Paginator.tsx +++ b/components/Paginator.tsx @@ -1,6 +1,6 @@ import Link from 'next/link' const Paginator = ({ currentPage, totalPage }:PaginatorProps):JSX.Element => { - const pages = [1, currentPage - 1, currentPage, currentPage + 1, totalPage ] + const pages = [1, currentPage === 1 ? 2 : currentPage - 1, currentPage === 1 ? 3 : currentPage, currentPage + 1, totalPage ] return