From abc1ff9de038ef705a78386e6754246c5d60fd4e Mon Sep 17 00:00:00 2001 From: Ajinkya Pande Date: Fri, 24 May 2024 00:07:19 +0530 Subject: [PATCH] IssueId #219606 feat: on submit should call the learnerai API call in Storylingo [React] --- src/components/Layouts.jsx/MainLayout.jsx | 8 +++++++- src/components/Mechanism/WordsOrImage.jsx | 2 ++ src/utils/VoiceAnalyser.js | 6 ++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/components/Layouts.jsx/MainLayout.jsx b/src/components/Layouts.jsx/MainLayout.jsx index 75b2edf8..b766c2fa 100644 --- a/src/components/Layouts.jsx/MainLayout.jsx +++ b/src/components/Layouts.jsx/MainLayout.jsx @@ -532,7 +532,13 @@ const MainLayout = (props) => { {enableNext ? ( handleNext()} + onClick={() => { + if (props.setIsNextButtonCalled) { + props.setIsNextButtonCalled(true); + } else { + handleNext(); + } + }} > diff --git a/src/components/Mechanism/WordsOrImage.jsx b/src/components/Mechanism/WordsOrImage.jsx index 9469bd58..6be06b59 100644 --- a/src/components/Mechanism/WordsOrImage.jsx +++ b/src/components/Mechanism/WordsOrImage.jsx @@ -94,6 +94,7 @@ const WordsOrImage = ({ livesData, gameOverData, loading, + setIsNextButtonCalled }} >