diff --git a/lib/components/ViewPublicationPage/ResultForm.tsx b/lib/components/ViewPublicationPage/ResultForm.tsx index 7d611c6..cd32dca 100644 --- a/lib/components/ViewPublicationPage/ResultForm.tsx +++ b/lib/components/ViewPublicationPage/ResultForm.tsx @@ -1,9 +1,4 @@ -import { - Box, - Button, Link, - Typography, - useTheme -} from "@mui/material"; +import { Box, Button, Link, Typography, useTheme } from "@mui/material"; import { NameplateLogo } from "@icons/NameplateLogo"; import YoutubeEmbedIframe from "./tools/YoutubeEmbedIframe"; @@ -16,264 +11,266 @@ import { useQuizViewStore } from "@/stores/quizView"; import { DESIGN_LIST } from "@/utils/designList"; type ResultFormProps = { - resultQuestion: QuizQuestionResult; + resultQuestion: QuizQuestionResult; }; export const ResultForm = ({ resultQuestion }: ResultFormProps) => { - const theme = useTheme(); - const isMobile = useRootContainerSize() < 650; - const isTablet = useRootContainerSize() < 1000; - const { settings, show_badge, quizId } = useQuizData(); - const setCurrentQuizStep = useQuizViewStore(state => state.setCurrentQuizStep); - const spec = settings.cfg.spec; - console.log(quizThemes[settings.cfg.theme].isLight); + const theme = useTheme(); + const isMobile = useRootContainerSize() < 650; + const isTablet = useRootContainerSize() < 1000; + const { settings, show_badge, quizId } = useQuizData(); + const setCurrentQuizStep = useQuizViewStore( + (state) => state.setCurrentQuizStep + ); + const spec = settings.cfg.spec; + console.log(quizThemes[settings.cfg.theme].isLight); - return ( + return ( + + - - - {settings.cfg.startpage.logo && - - } - - {settings.cfg.info.orgname} - - - - { - !resultQuestion?.content.useImage && resultQuestion.content.video && ( - - ) - } - { - resultQuestion?.content.useImage && resultQuestion.content.back && ( - - - - - ) - } - {resultQuestion.description !== "" && - resultQuestion.description !== " " && ( - - {resultQuestion.description} - - )} - - - {resultQuestion.title} - - - { - resultQuestion.content.text !== "" && - resultQuestion.content.text !== " " && ( - - { - resultQuestion.content.text - } - - ) - } - - - - - - {show_badge && - - - - Сделано на PenaQuiz - - - } - - - - - {settings.cfg.resultInfo.showResultForm === "before" && !settings.cfg.score && ( - - )} - {settings.cfg.resultInfo.showResultForm === "after" && - resultQuestion.content.redirect && ( - - )} - - - + {settings.cfg.startpage.logo && ( + + )} + + {settings.cfg.info.orgname} + - ); + + {!resultQuestion?.content.useImage && + resultQuestion.content.video && ( + + )} + {resultQuestion?.content.useImage && resultQuestion.content.back && ( + + + + )} + {resultQuestion.description !== "" && + resultQuestion.description !== " " && ( + + {resultQuestion.description} + + )} + + + {resultQuestion.title} + + + {resultQuestion.content.text !== "" && + resultQuestion.content.text !== " " && ( + + {resultQuestion.content.text} + + )} + + + + + {show_badge && ( + + + + Сделано на PenaQuiz + + + )} + + + + {settings.cfg.resultInfo.showResultForm === "before" && + !settings.cfg.score && ( + + )} + {settings.cfg.resultInfo.showResultForm === "after" && + resultQuestion.content.redirect && ( + + )} + + + + + ); };