From f31eeb0b03ba748fa47f8982d16c90ba326013b4 Mon Sep 17 00:00:00 2001 From: Mael Date: Thu, 13 Sep 2018 15:55:55 +0200 Subject: [PATCH] =?UTF-8?q?Ne=20pas=20afficher=20la=20solution=20=C3=A0=20?= =?UTF-8?q?un=20contr=C3=B4le=20si=20elle=20est=20r=C3=A9solue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/components/Controls.js | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/source/components/Controls.js b/source/components/Controls.js index 899fd720c..9e2263093 100644 --- a/source/components/Controls.js +++ b/source/components/Controls.js @@ -13,7 +13,8 @@ function Controls({ blockingInputControls, controls, startConversation, - currentQuestion + currentQuestion, + foldedSteps }) { let control = !blockingInputControls && @@ -55,17 +56,18 @@ function Controls({ {!message && (
{makeJsx(evaluated)}
)} - {solution && ( -
- {emoji('💡')} - -
- )} + {solution && + !foldedSteps.includes(solution.cible) && ( +
+ {emoji('💡')} + +
+ )} }} @@ -80,6 +82,7 @@ function Controls({ export default connect( (state, props) => ({ currentQuestion: currentQuestionSelector(state), + foldedSteps: state.conversationSteps.foldedSteps, key: props.language }), {