From aab37f2a1de1f086c18a0d6924b888c343bf9485 Mon Sep 17 00:00:00 2001 From: Nastya Date: Wed, 23 Oct 2024 22:15:05 +0300 Subject: [PATCH] =?UTF-8?q?result=20=5F=5F=D0=B8=D0=B7=5F=5F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ViewPublicationPage/ResultForm.tsx | 67 +++++++++++++------ 1 file changed, 46 insertions(+), 21 deletions(-) diff --git a/lib/components/ViewPublicationPage/ResultForm.tsx b/lib/components/ViewPublicationPage/ResultForm.tsx index ab1291f..a16f332 100644 --- a/lib/components/ViewPublicationPage/ResultForm.tsx +++ b/lib/components/ViewPublicationPage/ResultForm.tsx @@ -27,8 +27,10 @@ export const ResultForm = ({ resultQuestion }: ResultFormProps) => { const theme = useTheme(); const isMobile = useRootContainerSize() < 650; const isTablet = useRootContainerSize() < 1000; - const { settings, show_badge, quizId, preview } = useQuizSettings(); + const { settings, show_badge, quizId, questions, preview } = useQuizSettings(); const setCurrentQuizStep = useQuizViewStore((state) => state.setCurrentQuizStep); + //Список засчитанных баллов для балловых квизов + const pointsSum = useQuizViewStore((state) => state.pointsSum); const spec = settings.cfg.spec; const vkMetrics = useVkMetricsGoals(settings.cfg.vkMetricsNumber); const yandexMetrics = useYandexMetricsGoals(settings.cfg.yandexMetricsNumber); @@ -209,32 +211,55 @@ export const ResultForm = ({ resultQuestion }: ResultFormProps) => { {resultQuestion.content.text} )} - - Посмотреть ответы + Ваши баллы - } - sx={{ - mt: "60px", - width: "100%", - }} - > - - - - + + {pointsSum} из {questions.filter((e) => e.type != "result").length} + + + Посмотреть ответы + + } + sx={{ + mt: "60px", + width: "100%", + }} + > + + + + + + )} {show_badge && (