Uncommented a section
This commit is contained in:
@@ -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});
|
||||||
|
|||||||
Reference in New Issue
Block a user