()
| 51 | |
| 52 | console.log("in submit", score); |
| 53 | async function submitQuiz() { |
| 54 | try { |
| 55 | let score = getScore(atempted); |
| 56 | console.log("in submit", atempted); |
| 57 | await createQuizScore({ |
| 58 | userId, |
| 59 | score, |
| 60 | problemId: problem.id, |
| 61 | }); |
| 62 | toast({ |
| 63 | description: "Submitted Successfully", |
| 64 | }); |
| 65 | } catch (error) { |
| 66 | console.error("Error submitting quiz:", error); |
| 67 | toast({ |
| 68 | description: "Failed to submit the quiz.", |
| 69 | }); |
| 70 | } |
| 71 | } |
| 72 | toast({ |
| 73 | description: "Submitting...", |
| 74 | }); |
no test coverage detected