diff --git a/src/pages/ViewPublicationPage/ResultForm.tsx b/src/pages/ViewPublicationPage/ResultForm.tsx
index fffc3c18..8520f828 100644
--- a/src/pages/ViewPublicationPage/ResultForm.tsx
+++ b/src/pages/ViewPublicationPage/ResultForm.tsx
@@ -5,9 +5,9 @@ import { useCurrentQuiz } from "@root/quizes/hooks";
import { useQuestionsStore } from "@root/questions/store";
import type { AnyTypedQuizQuestion } from "../../model/questionTypes/shared";
-import YoutubeEmbedIframe from "../../ui_kit/StartPagePreview/YoutubeEmbedIframe.tsx"
+import YoutubeEmbedIframe from "../../ui_kit/StartPagePreview/YoutubeEmbedIframe.tsx";
import { NameplateLogo } from "@icons/NameplateLogo";
-import {modes} from "../../utils/themes/Publication/themePublication";
+import { modes } from "../../utils/themes/Publication/themePublication";
type ResultFormProps = {
currentQuestion: AnyTypedQuizQuestion;
@@ -21,25 +21,25 @@ export const ResultForm = ({
showContactForm,
setShowContactForm,
setShowResultForm,
-
}: ResultFormProps) => {
const quiz = useCurrentQuiz();
const mode = modes;
const { questions } = useQuestionsStore();
- const resultQuestion = questions.find(
+ const resultQuestion = (questions.find(
(question) =>
question.type === "result" &&
- (question.content.rule.parentId === "line" || currentQuestion.content.id)
- );
-
-
-
+ question.content.rule.parentId === currentQuestion.content.id
+ ) ||
+ questions.find(
+ (question) =>
+ question.type === "result" && question.content.rule.parentId === "line"
+ )) as AnyTypedQuizQuestion;
const followNextForm = () => {
setShowResultForm(false);
setShowContactForm(true);
};
- if (resultQuestion === undefined) return <>>
+ if (resultQuestion === undefined) return <>>;
return (
-
- {
- !resultQuestion?.content.useImage &&
- resultQuestion.content.video &&
+ {!resultQuestion?.content.useImage && resultQuestion.content.video && (
- }
- {
- resultQuestion?.content.useImage &&
- resultQuestion.content.back &&
+ )}
+ {resultQuestion?.content.useImage && resultQuestion.content.back && (
-
- }
- {resultQuestion.description !== "" && resultQuestion.description !== " " && {resultQuestion.description}}
+ >
+ )}
+ {resultQuestion.description !== "" &&
+ resultQuestion.description !== " " && (
+
+ {resultQuestion.description}
+
+ )}
{resultQuestion.title || "Форма результатов"}
+ >
+ {resultQuestion.title || "Форма результатов"}
- {resultQuestion.content.text !== "" && resultQuestion.content.text !== " " && {resultQuestion.content.text}}
-
-
+ {resultQuestion.content.text !== "" &&
+ resultQuestion.content.text !== " " && (
+
+ {resultQuestion.content.text}
+
+ )}
@@ -117,24 +120,30 @@ export const ResultForm = ({
display: "flex",
width: "100%",
justifyContent: "end",
- px: "20px"
+ px: "20px",
}}
>
- Сделано на PenaQuiz
+
+ Сделано на PenaQuiz
+
-
- {
- quiz?.config.resultInfo.when === "before" &&
+ {quiz?.config.resultInfo.when === "before" && (
<>
>
- }
+ )}
-
-
);
};