diff --git a/src/components/DiscoverSentance/DiscoverSentance.jsx b/src/components/DiscoverSentance/DiscoverSentance.jsx index 742981cb..9b574271 100644 --- a/src/components/DiscoverSentance/DiscoverSentance.jsx +++ b/src/components/DiscoverSentance/DiscoverSentance.jsx @@ -32,13 +32,14 @@ const SpeakSentenceComponent = () => { const [assesmentCount, setAssesmentcount] = useState(0); const [initialAssesment, setInitialAssesment] = useState(true); const [disableScreen, setDisableScreen] = useState(false); - const [play] = useSound(LevelCompleteAudio); + // const [play] = useSound(LevelCompleteAudio); const [openMessageDialog, setOpenMessageDialog] = useState(""); const [totalSyllableCount, setTotalSyllableCount] = useState(""); const [isNextButtonCalled, setIsNextButtonCalled] = useState(false); const callConfettiAndPlay = () => { - play(); + let audio = new Audio(LevelCompleteAudio); + audio.play(); callConfetti(); }; diff --git a/src/components/Practice/Mechanics6.jsx b/src/components/Practice/Mechanics6.jsx index 9b87bccb..4f272326 100644 --- a/src/components/Practice/Mechanics6.jsx +++ b/src/components/Practice/Mechanics6.jsx @@ -184,19 +184,11 @@ const Mechanics2 = ({ ? 0 : currrentProgress / duration; - const getEnableButton = () => { - if (type === "fillInTheBlank") { - return enableNext; - } - if (type === "audio") { - return selectedWord === wordToCheck; - } - }; return ( { const [disableScreen, setDisableScreen] = useState(false); const [mechanism, setMechanism] = useState(""); - const [play] = useSound(LevelCompleteAudio); + // const [play] = useSound(LevelCompleteAudio); const [livesData, setLivesData] = useState(); const [gameOverData, setGameOverData] = useState(); const [loading, setLoading] = useState(); @@ -71,7 +71,8 @@ const Practice = () => { }, [startShowCase]); const callConfettiAndPlay = () => { - play(); + let audio = new Audio(LevelCompleteAudio); + audio.play(); callConfetti(); }; @@ -600,6 +601,7 @@ const Practice = () => { }); let type = currentContentType?.toLowerCase(); + // console.log(type, sentence, matchedChar); if (type === "char" || type === "word") { const word = splitGraphemes(words[0].toLowerCase()).filter( (item) => item !== "‌" && item !== "" && item !== " " @@ -626,7 +628,7 @@ const Practice = () => { background: "#FFF0BD", }} > - {substr} + {i === 0 ? substr.toUpperCase() : substr} ); @@ -649,7 +651,7 @@ const Practice = () => { lineHeight: "50px", }} > - {word[i]} + {i === 0 ? word[i].toUpperCase() : word[i]} );