diff --git a/apps/frontend/src/routes/_verifyingLayout/verifying/index.lazy.tsx b/apps/frontend/src/routes/_verifyingLayout/verifying/index.lazy.tsx index 028d9f9..b9cae42 100644 --- a/apps/frontend/src/routes/_verifyingLayout/verifying/index.lazy.tsx +++ b/apps/frontend/src/routes/_verifyingLayout/verifying/index.lazy.tsx @@ -264,27 +264,27 @@ console.log("unanswered questions:", unanswered.length); }, [flaggedQuestions]); // Mutation function to toggle flag - const toggleFlagMutation = useMutation({ - mutationFn: toggleFlagAnswer, - onSuccess: (response) => { - if (response && response.answer) { - const { answer } = response; - setFlaggedQuestions((prevFlags) => { - const newFlags = { - ...prevFlags, - [answer.id]: answer.isFlagged !== null ? answer.isFlagged : false, - }; - // Simpan perubahan ke localStorage - localStorage.setItem("flaggedQuestions", JSON.stringify(newFlags)); - return newFlags; - }); - } - }, + // const toggleFlagMutation = useMutation({ + // mutationFn: toggleFlagAnswer, + // onSuccess: (response) => { + // if (response && response.answer) { + // const { answer } = response; + // setFlaggedQuestions((prevFlags) => { + // const newFlags = { + // ...prevFlags, + // [answer.id]: answer.isFlagged !== null ? answer.isFlagged : false, + // }; + // // Simpan perubahan ke localStorage + // localStorage.setItem("flaggedQuestions", JSON.stringify(newFlags)); + // return newFlags; + // }); + // } + // }, - onError: (error) => { - console.error("Error toggling flag:", error); - }, - }); + // onError: (error) => { + // console.error("Error toggling flag:", error); + // }, + // }); // Usage of the mutation in your component const { mutate: submitOption } = useMutation({