fix: Remove mocked data
parent
e08bc624d2
commit
e25adb1636
|
@ -6,7 +6,7 @@ import { Chip } from '@/design-system'
|
|||
import { Emoji } from '@/design-system/emoji'
|
||||
import { H2, H3 } from '@/design-system/typography/heading'
|
||||
import { Link } from '@/design-system/typography/link'
|
||||
import { Li, Ol, Ul } from '@/design-system/typography/list'
|
||||
import { Li, Ol } from '@/design-system/typography/list'
|
||||
import { Body } from '@/design-system/typography/paragraphs'
|
||||
import { useFetchData } from '@/hooks/useFetchData'
|
||||
|
||||
|
@ -59,51 +59,15 @@ function Pagination({ items }: PaginationProps) {
|
|||
return (
|
||||
<>
|
||||
<Ol>
|
||||
{[
|
||||
{
|
||||
title:
|
||||
'mon-entreprise: bug scrolling de la popup Answers (desktop et mobile)',
|
||||
closedAt: '2021-01-12T16:22:52Z',
|
||||
number: 1326,
|
||||
count: 1,
|
||||
},
|
||||
{
|
||||
title: 'Question vide avec le lien direct "impot"',
|
||||
closedAt: '2021-01-05T16:18:10Z',
|
||||
number: 1311,
|
||||
count: 2,
|
||||
},
|
||||
{
|
||||
title:
|
||||
'Abattament fiscal de 10% seulement sur les traitements et salaires',
|
||||
closedAt: '2021-01-05T14:02:59Z',
|
||||
number: 1306,
|
||||
count: 2,
|
||||
},
|
||||
{
|
||||
title: 'Franchise de TVA pour les professions libérales',
|
||||
closedAt: '2021-01-04T11:35:22Z',
|
||||
number: 1216,
|
||||
count: 1,
|
||||
},
|
||||
{
|
||||
title:
|
||||
"Simulateur Auto-Entrepreneur : chiffre d'affaire affiché à 100 000 000 €/an",
|
||||
closedAt: '2020-12-10T11:10:13Z',
|
||||
number: 1246,
|
||||
count: 1,
|
||||
},
|
||||
]
|
||||
.slice(currentPage * 10, (currentPage + 1) * 10)
|
||||
.map((item) => (
|
||||
<Issue key={`issue-${item.number}`} {...item} />
|
||||
))}
|
||||
{items.slice(currentPage * 10, (currentPage + 1) * 10).map((item) => (
|
||||
<Issue key={`issue-${item.number}`} {...item} />
|
||||
))}
|
||||
</Ol>
|
||||
<Pager>
|
||||
{[...Array(Math.ceil(items.length / 10)).keys()].map((i) => (
|
||||
<li key={i}>
|
||||
<PagerButton
|
||||
onPress={() => setCurrentPage(i)}
|
||||
onClick={() => setCurrentPage(i)}
|
||||
currentPage={currentPage === i}
|
||||
aria-selected={currentPage === i ? true : undefined}
|
||||
aria-current={currentPage === i ? 'page' : undefined}
|
||||
|
@ -146,7 +110,6 @@ function formatMonth(date: string | Date) {
|
|||
|
||||
type PagerButtonProps = {
|
||||
currentPage: boolean
|
||||
onPress: () => void
|
||||
}
|
||||
|
||||
const PagerButton = styled.button<PagerButtonProps>`
|
||||
|
|
Loading…
Reference in New Issue