Solved some small issues
This commit is contained in:
@@ -60,7 +60,6 @@ export default function InteractiveSpeaking({
|
|||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
|
|
||||||
const answer = await saveAnswer(questionIndex);
|
const answer = await saveAnswer(questionIndex);
|
||||||
console.log(questionIndex + 1 < prompts.length, questionIndex, prompts.length);
|
|
||||||
if (questionIndex + 1 < prompts.length) {
|
if (questionIndex + 1 < prompts.length) {
|
||||||
setQuestionIndex(questionIndex + 1);
|
setQuestionIndex(questionIndex + 1);
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
|
|||||||
@@ -87,10 +87,6 @@ export default function MatchSentences({id, options, type, prompt, sentences, us
|
|||||||
return {total, correct, missing};
|
return {total, correct, missing};
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
console.log(answers);
|
|
||||||
}, [answers]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (hasExamEnded) onNext({exercise: id, solutions: answers, score: calculateScore(), type});
|
if (hasExamEnded) onNext({exercise: id, solutions: answers, score: calculateScore(), type});
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ interface Props {
|
|||||||
|
|
||||||
export default function PaymobPayment({user, price, setIsPaymentLoading, currency, duration, duration_unit, onSuccess}: Props) {
|
export default function PaymobPayment({user, price, setIsPaymentLoading, currency, duration, duration_unit, onSuccess}: Props) {
|
||||||
const [isLoading, setIsLoading] = useState(false);
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
console.log(user.id);
|
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
|
|||||||
@@ -46,8 +46,6 @@ export default function BatchCodeGenerator({user}: {user: User}) {
|
|||||||
readAs: "ArrayBuffer",
|
readAs: "ArrayBuffer",
|
||||||
});
|
});
|
||||||
|
|
||||||
useEffect(() => console.log(expiryDate), [expiryDate]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!isExpiryDateEnabled) setExpiryDate(null);
|
if (!isExpiryDateEnabled) setExpiryDate(null);
|
||||||
}, [isExpiryDateEnabled]);
|
}, [isExpiryDateEnabled]);
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -86,7 +86,6 @@ const TaskTab = ({exam, difficulty, setExam}: {exam?: LevelPart; difficulty: Dif
|
|||||||
axios
|
axios
|
||||||
.get(`/api/exam/level/generate/level?${url.toString()}`)
|
.get(`/api/exam/level/generate/level?${url.toString()}`)
|
||||||
.then((result) => {
|
.then((result) => {
|
||||||
console.log({data: result.data});
|
|
||||||
playSound(typeof result.data === "string" ? "error" : "check");
|
playSound(typeof result.data === "string" ? "error" : "check");
|
||||||
if (typeof result.data === "string") return toast.error("Something went wrong, please try to generate again.");
|
if (typeof result.data === "string") return toast.error("Something went wrong, please try to generate again.");
|
||||||
setExam(result.data);
|
setExam(result.data);
|
||||||
|
|||||||
Reference in New Issue
Block a user