diff --git a/mon-entreprise/source/components/conversation/AnswerList.tsx b/mon-entreprise/source/components/conversation/AnswerList.tsx index 222ebb867..cf86f75cc 100644 --- a/mon-entreprise/source/components/conversation/AnswerList.tsx +++ b/mon-entreprise/source/components/conversation/AnswerList.tsx @@ -8,7 +8,10 @@ import emoji from 'react-easy-emoji' import { Trans, useTranslation } from 'react-i18next' import { useDispatch, useSelector } from 'react-redux' import { DottedName } from 'Rules' -import { answeredQuestionsSelector } from 'Selectors/simulationSelectors' +import { + answeredQuestionsSelector, + situationSelector +} from 'Selectors/simulationSelectors' import './AnswerList.css' type AnswerListProps = { @@ -17,7 +20,9 @@ type AnswerListProps = { export default function AnswerList({ onClose }: AnswerListProps) { const dispatch = useDispatch() - const answeredQuestions = useSelector(answeredQuestionsSelector) + const answeredQuestions: DottedName[] = Object.keys( + useSelector(situationSelector) + ) const nextSteps = useNextQuestions() return ( diff --git a/mon-entreprise/source/components/conversation/Input.tsx b/mon-entreprise/source/components/conversation/Input.tsx index c58104ce7..7c7dba5dd 100644 --- a/mon-entreprise/source/components/conversation/Input.tsx +++ b/mon-entreprise/source/components/conversation/Input.tsx @@ -1,5 +1,5 @@ import { formatValue } from 'publicodes' -import React, { useCallback } from 'react' +import React, { useCallback, useState } from 'react' import { useTranslation } from 'react-i18next' import NumberFormat from 'react-number-format' import { currencyFormat, debounce } from '../../utils' @@ -21,6 +21,7 @@ export default function Input({ const { language } = useTranslation().i18n const { thousandSeparator, decimalSeparator } = currencyFormat(language) + // const [currentValue, setCurrentValue] = useState(value) return (
@@ -42,9 +43,10 @@ export default function Input({ allowEmptyFormatting={true} // We don't want to call `onValueChange` in case this component is // re-render with a new "value" prop from the outside. - key={value} onValueChange={({ floatValue }) => { - debouncedOnChange(floatValue) + if (floatValue !== value) { + debouncedOnChange(floatValue) + } }} value={value} autoComplete="off" diff --git a/mon-entreprise/source/components/simulationExplanation/IndépendantExplanation.tsx b/mon-entreprise/source/components/simulationExplanation/IndépendantExplanation.tsx index 00bac0d0d..45c5a5ab5 100644 --- a/mon-entreprise/source/components/simulationExplanation/IndépendantExplanation.tsx +++ b/mon-entreprise/source/components/simulationExplanation/IndépendantExplanation.tsx @@ -46,34 +46,12 @@ export default function IndépendantExplanation() { function PLExplanation() { return ( -

Vos institutions partenaires

-
-
- - - -

- Les cotisations recouvrées par l'Urssaf, qui servent au financement - de la sécurité sociale (assurance maladie, allocations familiales, - dépendance) -

-

- -

-
- - + +

Vos institutions partenaires

+
- - + +

- En tant que professionnel de santé conventionné, vous bénéficiez - d'une prise en charge d'une partie de vos cotisations par - l'Assurance Maladie. + Les cotisations recouvrées par l'Urssaf, qui servent au + financement de la sécurité sociale (assurance maladie, allocations + familiales, dépendance)

- {' '} - +

- -
+ + +
+ + + +

+ En tant que professionnel de santé conventionné, vous bénéficiez + d'une prise en charge d'une partie de vos cotisations par + l'Assurance Maladie. +

+

+ {' '} + +

+
+
+
+
) }