Uncommented a section

This commit is contained in:
Tiago Ribeiro
2023-12-09 14:39:03 +00:00
parent 8b9537b272
commit e2e38284a7

View File

@@ -25,19 +25,19 @@ export default function Writing({
const hasExamEnded = useExamStore((state) => state.hasExamEnded); const hasExamEnded = useExamStore((state) => state.hasExamEnded);
// useEffect(() => { useEffect(() => {
// const listener = (e: KeyboardEvent) => { const listener = (e: KeyboardEvent) => {
// if ((e.ctrlKey || e.metaKey) && e.key === "v") { if ((e.ctrlKey || e.metaKey) && e.key === "v") {
// e.preventDefault(); e.preventDefault();
// } }
// }; };
// document.addEventListener("keydown", listener); document.addEventListener("keydown", listener);
// return () => { return () => {
// document.removeEventListener("keydown", listener); document.removeEventListener("keydown", listener);
// }; };
// }, []); }, []);
useEffect(() => { useEffect(() => {
if (hasExamEnded) onNext({exercise: id, solutions: [{id, solution: inputText}], score: {correct: 1, total: 1, missing: 0}, type}); if (hasExamEnded) onNext({exercise: id, solutions: [{id, solution: inputText}], score: {correct: 1, total: 1, missing: 0}, type});