Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
SocialGouv
1000jours
les1000jours
Commits
56b32dce
Unverified
Commit
56b32dce
authored
Sep 29, 2021
by
yannickjacqueline
Committed by
GitHub
Sep 29, 2021
Browse files
fix(epds): correction useState résultats (#721)
parent
655ee0b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
front/screens/epdsSurvey/epdsSurveyContent.component.tsx
front/screens/epdsSurvey/epdsSurveyContent.component.tsx
+5
-2
No files found.
front/screens/epdsSurvey/epdsSurveyContent.component.tsx
View file @
56b32dce
...
...
@@ -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
(
tru
e
);
const
[
showResult
,
setShowResult
]
=
useState
(
fals
e
);
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
();
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment