Skip to content

Commit

Permalink
feat: FROTND_END 화면 점수, 맞았습니다. 틀렸습니다 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
dalcheonroadhead committed May 19, 2024
1 parent 882f365 commit b7f508a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 16 deletions.
Empty file added frontend/src/page/Chat.jsx
Empty file.
18 changes: 5 additions & 13 deletions frontend/src/quiz/Answer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,15 @@ const Answer = ({setCurrentScreen, Qid, answer, point}) => {
<CountdownTimer onTimerEnd={handleTimerEnd} time={10}/>
<div className="text-center p-4">
<div className="bg-white rounded-full p-4 shadow-lg">
<div className="text-sm text-gray-500">YOUR SCORE</div>
<div className="text-sm text-gray-500">이번 게임 점수</div>
<div className="text-3xl font-bold">{point}</div>
</div>
<div className="mt-4 bg-white p-4 rounded-lg shadow-md">
<div className="text-lg">{answer}</div>
<div className="text-lg">당신의 포인트: {answer.submit == answer.ans? point : "0"}</div>
</div>
<div className="mt-4 bg-white p-4 rounded-lg shadow-md">
<div className="text-lg">다음 게임으로 고고! </div>
</div>
</div>
<div className="w-full p-4">
<Button className="bg-[#A3172D] text-white w-full py-3 rounded-lg mb-2 ">
오답모음!
</Button>
<Button className=" text-white w-full py-3 rounded-lg mb-2 hover:bg-[#A3172D]">
돌 하르방, 참돔, 야자수
</Button>
<Button className=" text-white w-full py-3 rounded-lg hover:bg-[#A3172D]">
에라 모르겠다.
</Button>
</div>
</LayoutforAns>
)
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/quiz/QuizContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ const QuizContainer = () => {
console.log(answer);
setAnswer(()=>answer);
toast({
title: `${answer.name}답변`,
description: `${answer.submit} 입니다.`
title: `${answer.name}답변은`,
description: `${answer.submit == answer.ans? "맞았습니다." : "틀렸습니다."}`
})
}

Expand All @@ -93,7 +93,7 @@ const QuizContainer = () => {
<Toaster/>
</>)
case 'Answer':
return <Answer setCurrentScreen={setCurrentScreen} Qid={Qid} answer={questions[currentQuestion].answer} point={questions[currentQuestion].point} />;
return <Answer setCurrentScreen={setCurrentScreen} Qid={Qid} answer={answer} point={questions[currentQuestion].point} />;
case 'Ranking':
return <RankingScreen currentScreen={currentScreen} setCurrentScreen={setCurrentScreen} nextQuestion={nextQuestion} Qid={Qid} />;
default:
Expand Down

0 comments on commit b7f508a

Please sign in to comment.