From e25adb163633c3f92bdb2056978816de77ca6ed2 Mon Sep 17 00:00:00 2001 From: Benjamin Arias Date: Thu, 16 Mar 2023 14:22:28 +0100 Subject: [PATCH] fix: Remove mocked data --- .../statistiques/DemandesUtilisateurs.tsx | 47 ++----------------- 1 file changed, 5 insertions(+), 42 deletions(-) diff --git a/site/source/pages/statistiques/DemandesUtilisateurs.tsx b/site/source/pages/statistiques/DemandesUtilisateurs.tsx index 60ab30205..1826d1917 100644 --- a/site/source/pages/statistiques/DemandesUtilisateurs.tsx +++ b/site/source/pages/statistiques/DemandesUtilisateurs.tsx @@ -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 ( <>
    - {[ - { - 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) => ( - - ))} + {items.slice(currentPage * 10, (currentPage + 1) * 10).map((item) => ( + + ))}
{[...Array(Math.ceil(items.length / 10)).keys()].map((i) => (
  • 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`