From f4c7ab4e306d2f04324853e67032d370abd65d0c Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Fri, 20 May 2022 15:37:08 +0200 Subject: chore: handle blog pagination when JS is disabled --- src/components/molecules/nav/pagination.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/components/molecules/nav/pagination.tsx') diff --git a/src/components/molecules/nav/pagination.tsx b/src/components/molecules/nav/pagination.tsx index 38f6841..934b50a 100644 --- a/src/components/molecules/nav/pagination.tsx +++ b/src/components/molecules/nav/pagination.tsx @@ -44,12 +44,12 @@ const Pagination: FC = ({ className = '', current, perPage, - siblings = 1, + siblings = 2, total, ...props }) => { const intl = useIntl(); - const totalPages = Math.ceil(total / perPage); + const totalPages = Math.round(total / perPage); const hasPreviousPage = current > 1; const previousPageName = intl.formatMessage( { @@ -205,14 +205,14 @@ const Pagination: FC = ({ return ( ); }; -- cgit v1.2.3