Unverified Commit 56b32dce authored by yannickjacqueline's avatar yannickjacqueline Committed by GitHub
Browse files

fix(epds): correction useState résultats (#721)

parent 655ee0b3
......@@ -33,7 +33,7 @@ const EpdsSurveyContent: React.FC<Props> = ({ epdsSurvey }) => {
const swiperRef = useRef<SwiperFlatList>(null);
const [questionsAndAnswers, setQuestionsAndAnswers] =
useState<EpdsQuestionAndAnswers[]>(epdsSurvey);
const [showResult, setShowResult] = useState(true);
const [showResult, setShowResult] = useState(false);
const [score, setScore] = useState(0);
const [surveyCanBeStarted, setSurveyCanBeStarted] = useState(false);
const [lastQuestionHas3PointAnswer, setLastQuestionHas3PointAnswer] =
......@@ -151,7 +151,10 @@ const EpdsSurveyContent: React.FC<Props> = ({ epdsSurvey }) => {
<EpdsLightResult
result={score}
epdsSurvey={questionsAndAnswers}
showBeContactedButton={true}
showBeContactedButton={
score >= EpdsConstants.RESULT_BECONTACTED_VALUE ||
lastQuestionHas3PointAnswer
}
startSurveyOver={async () => {
await restartSurvey();
}}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment