Skip to content

Commit

Permalink
Issueid #228824 Api integration of Fill in the blanks Mechanics
Browse files Browse the repository at this point in the history
  • Loading branch information
ajinkyapandetekdi committed Oct 16, 2024
1 parent e530ad8 commit 00d2c65
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/components/Practice/Mechanics3.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ const Mechanics2 = ({
};

const [currrentProgress, setCurrrentProgress] = React.useState(0);
const progressBarWidth = isNaN(currrentProgress / duration)
const progressBarWidth = Number.isNaN(currrentProgress / duration)
? 0
: currrentProgress / duration;

Expand Down
5 changes: 3 additions & 2 deletions src/components/Practice/Mechanics6.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ const Mechanics2 = ({
}

// if (type === "audio") {
const isSoundCorrect = word === wordToCheck ? true : false;
var audio = new Audio(isSoundCorrect ? correctSound : wrongSound);
const isSoundCorrect = word === wordToCheck;
let audio = new Audio(isSoundCorrect ? correctSound : wrongSound);
if (!isSoundCorrect) {
setEnableNext(false);
}
Expand Down Expand Up @@ -433,6 +433,7 @@ const Mechanics2 = ({
>
{words?.map((elem) => (
<Box
key={elem}
className={`${
type === "audio" && selectedWord === elem
? selectedWord === parentWords
Expand Down
6 changes: 3 additions & 3 deletions src/utils/constants.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 00d2c65

Please sign in to comment.