fix: Pagination button

pull/2573/head
Benjamin Arias 2023-03-16 13:01:40 +01:00 committed by Jérémy Rialland
parent b253c7a746
commit e08bc624d2
1 changed files with 2 additions and 1 deletions

View File

@ -103,7 +103,7 @@ function Pagination({ items }: PaginationProps) {
{[...Array(Math.ceil(items.length / 10)).keys()].map((i) => (
<li key={i}>
<PagerButton
onClick={() => setCurrentPage(i)}
onPress={() => setCurrentPage(i)}
currentPage={currentPage === i}
aria-selected={currentPage === i ? true : undefined}
aria-current={currentPage === i ? 'page' : undefined}
@ -146,6 +146,7 @@ function formatMonth(date: string | Date) {
type PagerButtonProps = {
currentPage: boolean
onPress: () => void
}
const PagerButton = styled.button<PagerButtonProps>`