import { Box, Typography, useTheme } from "@mui/material"; import { useQuizViewStore, updateAnswer } from "@root/quizView/store"; import type { QuizQuestionPage } from "../../../model/questionTypes/page"; import YoutubeEmbedIframe from "../tools/YoutubeEmbedIframe"; type PageProps = { currentQuestion: QuizQuestionPage; }; export const Page = ({ currentQuestion }: PageProps) => { const theme = useTheme(); const { answers } = useQuizViewStore(); const { answer } = answers.find(({ questionId }) => questionId === currentQuestion.id) ?? {}; return ( {currentQuestion.title} {currentQuestion.content.text} { //@ts-ignore currentQuestion.content.useImage ? ( ) : ( )} ); };