import { Box, Typography } from "@mui/material"; import { useQuizViewStore, updateAnswer } from "@root/quizView"; import type { QuizQuestionPage } from "../../../model/questionTypes/page"; type PageProps = { currentQuestion: QuizQuestionPage; }; export const Page = ({ currentQuestion }: PageProps) => { const { answers } = useQuizViewStore(); const { answer } = answers.find(({ questionId }) => questionId === currentQuestion.content.id) ?? {}; return ( {currentQuestion.title} {currentQuestion.content.text} {currentQuestion.content.picture && ( )} {currentQuestion.content.video && ( ); };