From 82dd0929faa3a33a49c0390bcdae49c3f9ecd6c8 Mon Sep 17 00:00:00 2001 From: Alice Dahan Date: Tue, 15 Oct 2024 16:53:26 +0200 Subject: [PATCH] =?UTF-8?q?refactor:=20ajoute=20une=20prop=20contexte=20?= =?UTF-8?q?=C3=A0=20SimulationValue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- site/source/components/Simulation/SimulationValue.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/site/source/components/Simulation/SimulationValue.tsx b/site/source/components/Simulation/SimulationValue.tsx index 982d29221..ce54a1872 100644 --- a/site/source/components/Simulation/SimulationValue.tsx +++ b/site/source/components/Simulation/SimulationValue.tsx @@ -6,6 +6,7 @@ import { styled } from 'styled-components' import { Grid } from '@/design-system/layout' import { Body } from '@/design-system/typography/paragraphs' +import { Contexte } from '@/domaine/Contexte' import { targetUnitSelector } from '@/store/selectors/simulationSelectors' import RuleLink from '../RuleLink' @@ -22,6 +23,7 @@ type SimulationValueProps = { isInfoMode?: boolean displayedUnit?: string round?: boolean + contexte?: Contexte } export function SimulationValue({ @@ -32,6 +34,7 @@ export function SimulationValue({ appear = true, isTypeBoolean = false, // TODO : remove when type inference works in publicodes isInfoMode = false, + contexte = {}, }: SimulationValueProps) { const engine = useEngine() const currentUnit = useSelector(targetUnitSelector) @@ -39,6 +42,7 @@ export function SimulationValue({ valeur: dottedName, arrondi: round ? 'oui' : 'non', ...(!isTypeBoolean ? { unité: currentUnit } : {}), + contexte, }) const initialRender = useInitialRender() if (evaluation.nodeValue === null) {