From c72857b52d7d847ae667c8295614361d3abe573e Mon Sep 17 00:00:00 2001 From: Johan Girod Date: Sun, 26 Jan 2020 18:13:21 +0100 Subject: [PATCH] =?UTF-8?q?enl=C3=A8ve=20les=20console.log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/components/conversation/DateInput.tsx | 4 +--- source/engine/RuleInput.tsx | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/source/components/conversation/DateInput.tsx b/source/components/conversation/DateInput.tsx index 134f24d96..75f310ae1 100644 --- a/source/components/conversation/DateInput.tsx +++ b/source/components/conversation/DateInput.tsx @@ -6,7 +6,6 @@ import SendButton from './SendButton' export default function DateInput({ suggestions, onChange, onSubmit, value }) { const dateValue = useMemo(() => { - console.log(value) if (!value) return undefined const [day, month, year] = normalizeDateString(value).split('/') return `${year}-${month}-${day}` @@ -14,9 +13,8 @@ export default function DateInput({ suggestions, onChange, onSubmit, value }) { const handleDateChange = useCallback( evt => { - console.log(evt.target.value) if (!evt.target.value) { - return onChange(undefined) + return onChange(null) } const [year, month, day] = evt.target.value.split('-') onChange(`${day}/${month}/${year}`) diff --git a/source/engine/RuleInput.tsx b/source/engine/RuleInput.tsx index 1b85a3c37..67a2baa32 100644 --- a/source/engine/RuleInput.tsx +++ b/source/engine/RuleInput.tsx @@ -98,7 +98,7 @@ export default function InputComponent({ ) } - if (unit?.numerators.includes('€') && isTarget && typeof value === 'number') { + if (unit?.numerators.includes('€') && isTarget) { return ( <>