Solved a bug for level test
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import {MultipleChoiceExercise, MultipleChoiceQuestion} from "@/interfaces/exam";
|
||||
import useExamStore from "@/stores/examStore";
|
||||
import clsx from "clsx";
|
||||
import {isNaN} from "lodash";
|
||||
import {useEffect, useState} from "react";
|
||||
import {CommonProps} from ".";
|
||||
import Button from "../Low/Button";
|
||||
@@ -16,9 +17,13 @@ function Question({
|
||||
}: MultipleChoiceQuestion & {userSolution: string | undefined; onSelectOption?: (option: string) => void; showSolution?: boolean}) {
|
||||
return (
|
||||
<div className="flex flex-col gap-10">
|
||||
<span className="">
|
||||
{id} - {prompt}
|
||||
</span>
|
||||
{isNaN(id) ? (
|
||||
<span className="">{prompt}</span>
|
||||
) : (
|
||||
<span className="">
|
||||
{id} - {prompt}
|
||||
</span>
|
||||
)}
|
||||
<div className="flex flex-wrap gap-4 justify-between">
|
||||
{variant === "image" &&
|
||||
options.map((option) => (
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/* eslint-disable @next/next/no-img-element */
|
||||
import {MultipleChoiceExercise, MultipleChoiceQuestion} from "@/interfaces/exam";
|
||||
import clsx from "clsx";
|
||||
import {isNaN} from "lodash";
|
||||
import {useEffect, useState} from "react";
|
||||
import {CommonProps} from ".";
|
||||
import Button from "../Low/Button";
|
||||
@@ -27,9 +28,13 @@ function Question({
|
||||
|
||||
return (
|
||||
<div className="flex flex-col items-center gap-4">
|
||||
<span>
|
||||
{id} - {prompt}
|
||||
</span>
|
||||
{isNaN(id) ? (
|
||||
<span className="">{prompt}</span>
|
||||
) : (
|
||||
<span className="">
|
||||
{id} - {prompt}
|
||||
</span>
|
||||
)}
|
||||
<div className="grid grid-cols-4 gap-4 place-items-center">
|
||||
{variant === "image" &&
|
||||
options.map((option) => (
|
||||
|
||||
Reference in New Issue
Block a user