diff options
Diffstat (limited to 'src/components/molecules/nav/pagination.tsx')
| -rw-r--r-- | src/components/molecules/nav/pagination.tsx | 10 |
1 files changed, 5 insertions, 5 deletions
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<PaginationProps> = ({ 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<PaginationProps> = ({ return ( <nav className={`${styles.wrapper} ${className}`} {...props}> + <ul className={`${styles.list} ${styles['list--pages']}`}> + {getPages(current, totalPages)} + </ul> <ul className={styles.list}> {hasPreviousPage && getItem('previous', previousPageName, previousPageUrl)} {hasNextPage && getItem('next', nextPageName, nextPageUrl)} </ul> - <ul className={`${styles.list} ${styles['list--pages']}`}> - {getPages(current, totalPages)} - </ul> </nav> ); }; |
