fix question type
This commit is contained in:
parent
12c2446edf
commit
7bec46efcc
@ -84,7 +84,7 @@ export default function QuestionsPageCard({
|
|||||||
const [open, setOpen] = useState<boolean>(false);
|
const [open, setOpen] = useState<boolean>(false);
|
||||||
const quizId = Number(useParams().quizId);
|
const quizId = Number(useParams().quizId);
|
||||||
const { listQuestions } = questionStore();
|
const { listQuestions } = questionStore();
|
||||||
const question = listQuestions[quizId][totalIndex] as QuizQuestionBase;
|
const question = listQuestions[quizId][totalIndex];
|
||||||
const anchorRef = useRef(null);
|
const anchorRef = useRef(null);
|
||||||
const debounced = useDebouncedCallback((title) => {
|
const debounced = useDebouncedCallback((title) => {
|
||||||
updateQuestionsList<QuizQuestionBase>(quizId, totalIndex, { title });
|
updateQuestionsList<QuizQuestionBase>(quizId, totalIndex, { title });
|
||||||
@ -156,7 +156,7 @@ export default function QuestionsPageCard({
|
|||||||
),
|
),
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
{question.type.length === 0 ? (
|
{question.type === "nonselected" ? (
|
||||||
<FormTypeQuestions totalIndex={totalIndex} />
|
<FormTypeQuestions totalIndex={totalIndex} />
|
||||||
) : (
|
) : (
|
||||||
<SwitchQuestionsPage totalIndex={totalIndex} />
|
<SwitchQuestionsPage totalIndex={totalIndex} />
|
||||||
|
Loading…
Reference in New Issue
Block a user