From 86319d26e0031d7ae9d77f42d58fb29fbbbc116f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Rialland?= Date: Mon, 25 Apr 2022 12:30:10 +0200 Subject: [PATCH] Fixe type --- site/source/components/Simulation/SimulationGoal.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site/source/components/Simulation/SimulationGoal.tsx b/site/source/components/Simulation/SimulationGoal.tsx index c8abbd585..220b40ae8 100644 --- a/site/source/components/Simulation/SimulationGoal.tsx +++ b/site/source/components/Simulation/SimulationGoal.tsx @@ -3,7 +3,7 @@ import { SmallBody } from '@/design-system/typography/paragraphs' import { targetUnitSelector } from '@/selectors/simulationSelectors' import { Grid } from '@mui/material' import { DottedName } from 'modele-social' -import { formatValue } from 'publicodes' +import { formatValue, PublicodesExpression } from 'publicodes' import React, { useCallback, useState } from 'react' import { useDispatch, useSelector } from 'react-redux' import styled from 'styled-components' @@ -48,7 +48,7 @@ export function SimulationGoal({ const initialRender = useInitialRender() const [isFocused, setFocused] = useState(false) const onChange = useCallback( - (x) => { + (x?: PublicodesExpression) => { dispatch(updateSituation(dottedName, x)) onUpdateSituation?.(dottedName, x) },