2024-06-29 09:32:16 +00:00
|
|
|
import { useQuizViewStore } from "@stores/quizView";
|
|
|
|
import { TextNormal } from "./TextNormal";
|
2024-04-23 14:45:49 +00:00
|
|
|
|
|
|
|
import type { QuizQuestionText } from "@model/questionTypes/text";
|
|
|
|
|
|
|
|
type TextProps = {
|
|
|
|
currentQuestion: QuizQuestionText;
|
|
|
|
stepNumber: number | null;
|
|
|
|
};
|
|
|
|
|
|
|
|
export const Text = ({ currentQuestion, stepNumber }: TextProps) => {
|
|
|
|
const answers = useQuizViewStore((state) => state.answers);
|
2024-05-31 16:41:18 +00:00
|
|
|
const { answer } = answers.find(({ questionId }) => questionId === currentQuestion.id) ?? {};
|
2024-04-23 14:45:49 +00:00
|
|
|
|
2025-07-11 15:19:06 +00:00
|
|
|
return (
|
|
|
|
<TextNormal
|
|
|
|
currentQuestion={currentQuestion}
|
|
|
|
answer={answer}
|
|
|
|
/>
|
|
|
|
);
|
2024-04-23 14:45:49 +00:00
|
|
|
};
|