From e1e5ccfe1e51fec7ea6af8038da0ba18342bf3f8 Mon Sep 17 00:00:00 2001 From: Johan Girod Date: Fri, 1 Mar 2024 19:24:30 +0100 Subject: [PATCH] feat: improve simulator bloc on stat page --- site/source/pages/statistiques/StatsPage.tsx | 36 +++++++++++++------ .../_components/SimulateursChoice.tsx | 2 +- site/source/pages/statistiques/index.tsx | 17 --------- 3 files changed, 27 insertions(+), 28 deletions(-) diff --git a/site/source/pages/statistiques/StatsPage.tsx b/site/source/pages/statistiques/StatsPage.tsx index 8fcee2beb..7fcbd3820 100644 --- a/site/source/pages/statistiques/StatsPage.tsx +++ b/site/source/pages/statistiques/StatsPage.tsx @@ -3,13 +3,16 @@ import { Trans } from 'react-i18next' import { useSearchParams } from 'react-router-dom' import { toAtString } from '@/components/ATInternetTracking' +import Privacy from '@/components/layout/Footer/Privacy' +import { FromTop } from '@/components/ui/animate' import { useScrollToHash } from '@/components/utils/markdown' +import { Emoji } from '@/design-system/emoji' import { Grid, Spacing } from '@/design-system/layout' import { Switch } from '@/design-system/switch' import { Strong } from '@/design-system/typography' -import { H2, H3 } from '@/design-system/typography/heading' +import { H1, H2, H3 } from '@/design-system/typography/heading' import { Li, Ul } from '@/design-system/typography/list' -import { Body } from '@/design-system/typography/paragraphs' +import { Body, Intro } from '@/design-system/typography/paragraphs' import useSimulatorsData, { SimulatorData } from '@/hooks/useSimulatorsData' import PagesChart from '@/pages/statistiques/_components/PagesCharts' @@ -42,23 +45,36 @@ export default function StatPage({ stats }: StatsDetailProps) { return ( <> - - + + + + +

+ Statistiques +

+ + + Découvrez nos statistiques d'utilisation mises à jour + quotidiennement. + + + Les données recueillies sont anonymisées.{' '} + +
- - + {filter && ( - <> - + + - - + + )} diff --git a/site/source/pages/statistiques/_components/SimulateursChoice.tsx b/site/source/pages/statistiques/_components/SimulateursChoice.tsx index 0e35de491..a3ceb52c0 100644 --- a/site/source/pages/statistiques/_components/SimulateursChoice.tsx +++ b/site/source/pages/statistiques/_components/SimulateursChoice.tsx @@ -15,7 +15,7 @@ export function SelectedSimulator(props: { filter: Filter | '' }) { return null } - return + return } export function SimulateursChoice(props: { onChange: (ch: Filter | '') => void diff --git a/site/source/pages/statistiques/index.tsx b/site/source/pages/statistiques/index.tsx index 9ac0ee4f2..7422e72eb 100644 --- a/site/source/pages/statistiques/index.tsx +++ b/site/source/pages/statistiques/index.tsx @@ -2,12 +2,9 @@ import { lazy, Suspense } from 'react' import { useTranslation } from 'react-i18next' import { TrackPage } from '@/components/ATInternetTracking' -import Privacy from '@/components/layout/Footer/Privacy' import MoreInfosOnUs from '@/components/MoreInfosOnUs' -import PageHeader from '@/components/PageHeader' import Meta from '@/components/utils/Meta' import { ScrollToTop } from '@/components/utils/Scroll' -import { Emoji } from '@/design-system/emoji' import { Intro } from '@/design-system/typography/paragraphs' const Stats = lazy(() => import('./Stats')) @@ -26,20 +23,6 @@ export default function StatsPage() { )} /> - - Statistiques - - } - > - - DĂ©couvrez nos statistiques d'utilisation mises Ă  jour quotidiennement. -
- Les données recueillies sont anonymisées.{' '} - -
-
Chargement des statistiques...}>