fix: when steps has no length, not showing content
This commit is contained in:
parent
30dd824526
commit
06ba1a923f
|
|
@ -141,7 +141,9 @@ const page = ({ params }: IParams) => {
|
|||
</div>
|
||||
|
||||
<div className="flex flex-col md:gap-[160px] gap-[80px]">
|
||||
{data.data.has_steps !== 0 && data.data.steps && (
|
||||
{data.data.has_steps !== 0 &&
|
||||
data.data.steps &&
|
||||
data.data.steps?.length > 0 && (
|
||||
<div className="flex flex-col gap-4 items-center w-full">
|
||||
<h1 className="text-textBlack md:text-[60px] leading-[100%] font-semibold">
|
||||
Tapgyr
|
||||
|
|
|
|||
|
|
@ -25,7 +25,8 @@ const QuizQuestionList = ({
|
|||
const [questionData, setQuestionsData] = useState<Question[] | undefined>(
|
||||
initialQuestionsData.data.questions
|
||||
? initialQuestionsData.data.questions
|
||||
: initialQuestionsData.data.steps
|
||||
: initialQuestionsData.data.steps &&
|
||||
initialQuestionsData.data.steps.length > 0
|
||||
? initialQuestionsData.data.steps[0].questions
|
||||
: []
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue