Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
sawa3030 committed Mar 25, 2024
1 parent bd02bd8 commit f94924d
Showing 1 changed file with 36 additions and 38 deletions.
74 changes: 36 additions & 38 deletions learn/src/components/PracticeTouch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,45 +26,43 @@ export default function PracticeTouch({
const answerMessage = rightOrWrong ? "正解" : "不正解";

return (
<>
<div className="max-w-xl">
{question}
<br />
<div className="flex flex-row-reverse flex-wrap">
{brailleStrings.map((brailleChar, i) => (
<EdittableBraille
key={i}
height="150"
width="90"
braille={brailleChar}
setBraille={(braille) => {
setBrailleStrings(
new BrailleArray(
brailleStrings.map((_, j) => (j === i ? braille : _)),
),
);
}}
/>
))}
</div>

{/* <br /> */}
<Button
variant="contained"
onClick={() => {
judgeAnswer(
brailleDotCount === 6
? judge(brailleStrings, answer, true)
: eightJudge(brailleStrings, answer),
);
setVisible(!visible);
}}
>
{visible ? "答え非表示" : "答え合わせ"}
</Button>
{visible === true && answerMessage}
<div className="max-w-xl">
{question}
<br />
<div className="flex flex-row-reverse flex-wrap">
{brailleStrings.map((brailleChar, i) => (
<EdittableBraille
key={i}
height="150"
width="90"
braille={brailleChar}
setBraille={(braille) => {
setBrailleStrings(
new BrailleArray(
brailleStrings.map((_, j) => (j === i ? braille : _)),
),
);
}}
/>
))}
</div>
</>

{/* <br /> */}
<Button
variant="contained"
onClick={() => {
judgeAnswer(
brailleDotCount === 6
? judge(brailleStrings, answer, true)
: eightJudge(brailleStrings, answer),
);
setVisible(!visible);
}}
>
{visible ? "答え非表示" : "答え合わせ"}
</Button>
{visible === true && answerMessage}
</div>
);
}

Expand Down

0 comments on commit f94924d

Please sign in to comment.