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.module.scss | 2 +- src/components/molecules/nav/pagination.tsx | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/components/molecules') diff --git a/src/components/molecules/nav/pagination.module.scss b/src/components/molecules/nav/pagination.module.scss index a8cef47..56c5bfc 100644 --- a/src/components/molecules/nav/pagination.module.scss +++ b/src/components/molecules/nav/pagination.module.scss @@ -13,7 +13,7 @@ &--pages { column-gap: var(--spacing-2xs); - margin-top: var(--spacing-sm); + margin-bottom: var(--spacing-sm); } } 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