From f9509a79a79946604f2e60878ddfcb2b56b4b214 Mon Sep 17 00:00:00 2001 From: rebeccadumazert Date: Wed, 10 Jan 2024 17:17:45 +0100 Subject: [PATCH 1/2] custom css to fix dsfr error --- front/src/custom-style.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/front/src/custom-style.css b/front/src/custom-style.css index 863ba88..4862638 100644 --- a/front/src/custom-style.css +++ b/front/src/custom-style.css @@ -9,3 +9,8 @@ .fr-icon-github-fill { border: 1px solid var(--border-default-grey); } + +/* DELETE UNNECESSARY DIV IN THE DSFR CARD COMPONENT */ +.fr-card__end{ + display: none; +} From 40de2d572ebae6e13e296bc51547c8b5910bd2d4 Mon Sep 17 00:00:00 2001 From: rebeccadumazert Date: Wed, 10 Jan 2024 17:18:42 +0100 Subject: [PATCH 2/2] update dashboard card --- front/src/constants.ts | 1 + .../providers/connectedSpaces/Dashboard.tsx | 30 ++++++++++++++----- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/front/src/constants.ts b/front/src/constants.ts index cc70731..b52f3eb 100644 --- a/front/src/constants.ts +++ b/front/src/constants.ts @@ -5,4 +5,5 @@ export const COLORS = { cardBackground: fr.colors.decisions.background.default.grey.hover, titleColor: fr.colors.decisions.text.title.blueFrance.default, buttonBackground: fr.colors.decisions.background.default.grey.default, + textColorGrey: fr.colors.decisions.text.mention.grey.default, }; diff --git a/front/src/providers/connectedSpaces/Dashboard.tsx b/front/src/providers/connectedSpaces/Dashboard.tsx index c39798f..386c0ff 100644 --- a/front/src/providers/connectedSpaces/Dashboard.tsx +++ b/front/src/providers/connectedSpaces/Dashboard.tsx @@ -3,32 +3,46 @@ import Title1 from '../../titles/Title1'; import { Card } from '@codegouvfr/react-dsfr/Card'; import { useRouteLoaderData } from 'react-router-dom'; import { OidcClients } from '../../types'; +import { COLORS } from '../../constants'; export const Dashboard = () => { const oidcClients = useRouteLoaderData('dashboard') as OidcClients; + const keys = 'Clés de test'; return (
Tableau de bord
{oidcClients.map((oidcClient) => ( -
+
-
  • - Clés de test - DINUM -
  • - + <> +
      +
    • + {keys.includes('test') ? ( + + Clés de test + + ) : ( + {keys} + )} +
    • +
    +

    + → DINUM +

    + } title={oidcClient.clientName} titleAs="h2"