From 33fbe83f3a0d527ffe44d3567706433a0641bc54 Mon Sep 17 00:00:00 2001 From: Emile Bex Date: Tue, 1 Aug 2023 17:41:42 +0200 Subject: [PATCH 1/2] fix(numbers): fix additional zero displayed --- src/components/cards/NumberCard.tsx | 11 ++++++++--- src/components/partials/NumberPartial.tsx | 8 ++++++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/components/cards/NumberCard.tsx b/src/components/cards/NumberCard.tsx index 7feebeb50..4dc20abae 100644 --- a/src/components/cards/NumberCard.tsx +++ b/src/components/cards/NumberCard.tsx @@ -12,12 +12,17 @@ const AnimatedNumber = ({ value }: { value: number | string }) => { } return (
- {isVisible && typeof value === 'number' ? ( - + {isVisible ? ( + <> + {typeof value === 'number' ? ( + + ) : ( + <>{value} + )} + ) : ( 0 )} - {isVisible && typeof value !== 'number' ? <>{value} : 0}
); }} diff --git a/src/components/partials/NumberPartial.tsx b/src/components/partials/NumberPartial.tsx index ba23fd98e..a88d5d3ea 100644 --- a/src/components/partials/NumberPartial.tsx +++ b/src/components/partials/NumberPartial.tsx @@ -4,12 +4,16 @@ import { NumberGrid } from 'src/components/partials/NumberGrid'; import { Section } from 'src/components/utils'; const staticNumbers = [ - { value: 400, description: 'candidats accompagnés', animated: true }, + { value: 400, description: 'candidats accompagnés', animate: true }, { value: '72%', description: 'de sorties positives en 2022', }, - { value: 700, description: "entreprises mobilisées dans l'inclusion" }, + { + value: 700, + description: "entreprises mobilisées dans l'inclusion", + animate: true, + }, ]; export const NumberPartial = () => { From 737c23f23cd9959a2970c96be2b225dc0e30592c Mon Sep 17 00:00:00 2001 From: Emile Bex Date: Tue, 1 Aug 2023 17:48:29 +0200 Subject: [PATCH 2/2] v2.6.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6197ba2c4..e422bb210 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "linkedout-front", - "version": "2.6.1", + "version": "2.6.2", "description": "", "main": "index.js", "engines": {