Skip to content

Commit

Permalink
Merge pull request #215 from gouravmore/rig-templates
Browse files Browse the repository at this point in the history
Issue #0000: duplicate char issue
  • Loading branch information
gouravmore authored Feb 11, 2024
2 parents 7c4d3e4 + f65a974 commit f3cc7a1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pages/Test-Rig-Two/Story/SpellAndCheck.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ const SpellAndCheck = ({
return wordChars.map((char, index) => (
<div
key={index}
className={`${matchedChars.includes(char) ? 'source-char-disable' : 'source-char'
className={`${matchedChars[index] ? 'source-char-disable' : 'source-char'
}`}
onClick={() =>
matchedChars.includes(char) ? null : handleCharacterClick(index)
matchedChars[index] ? null : handleCharacterClick(index)
}
>
{char}
Expand All @@ -105,10 +105,10 @@ const SpellAndCheck = ({
<div
key={index}
style={{ fontSize: '30px', textAlign: 'center' }}
className={`target-char ${matchedChars.includes(char) ? 'matched-char' : ''
className={`target-char ${matchedChars[index] ? 'matched-char' : ''
}`}
>
{matchedChars.includes(char) ? (
{matchedChars[index] ? (
<div className="">{char}</div>
) : (
<div className="empty-box" />
Expand Down

0 comments on commit f3cc7a1

Please sign in to comment.