diff --git a/src/pages/Questions/AnswerDraggableList/AnswerItem.tsx b/src/pages/Questions/AnswerDraggableList/AnswerItem.tsx index ad9a941d..d2951054 100644 --- a/src/pages/Questions/AnswerDraggableList/AnswerItem.tsx +++ b/src/pages/Questions/AnswerDraggableList/AnswerItem.tsx @@ -77,17 +77,16 @@ export const AnswerItem = ({ }} > ) => { if (target.value.length <= 1000) { - const inputValue = target.value; - setInputValue(inputValue); + setInputValue(target.value); } - setQuestionVariantAnswer(inputValue || " "); + setQuestionVariantAnswer(target.value || " "); }} onKeyDown={(event: KeyboardEvent) => { if (disableKeyDown) { @@ -177,7 +176,12 @@ export const AnswerItem = ({ }, }} inputProps={{ - sx: { fontSize: "18px", lineHeight: "21px", py: 0, ml: "13px" }, + sx: { + fontSize: "18px", + lineHeight: "21px", + py: 0, + ml: "13px", + }, "data-cy": "quiz-variant-question-answer", }} /> diff --git a/src/stores/quizes/actions.ts b/src/stores/quizes/actions.ts index 570d8cee..b703f97e 100644 --- a/src/stores/quizes/actions.ts +++ b/src/stores/quizes/actions.ts @@ -186,8 +186,7 @@ export const createQuiz = async (navigate: NavigateFunction) => addQuiz(quiz); setEditQuizId(quiz.backendId); navigate("/edit"); - - await createUntypedQuestion(rawQuiz.id); + createUntypedQuestion(rawQuiz.id); } catch (error) { devlog("Error creating quiz", error);