diff --git a/lib/components/ViewPublicationPage/Question.tsx b/lib/components/ViewPublicationPage/Question.tsx
index f63f1b3..15d1fff 100644
--- a/lib/components/ViewPublicationPage/Question.tsx
+++ b/lib/components/ViewPublicationPage/Question.tsx
@@ -22,7 +22,7 @@ import { notReachable } from "@utils/notReachable";
import { quizThemes } from "@utils/themes/Publication/themePublication";
import { DESIGN_LIST } from "@/utils/designList";
-import type { ReactNode } from "react";
+import { type ReactNode } from "react";
type Props = {
currentQuestion: RealTypedQuizQuestion;
@@ -123,7 +123,11 @@ export const Question = ({
{questionSelect}
-
+
);
@@ -140,7 +144,12 @@ function QuestionByType({ question, stepNumber }: { question: RealTypedQuizQuest
case "emoji":
return ;
case "text":
- return ;
+ return (
+
+ );
case "select":
return ;
case "date":
diff --git a/lib/components/ViewPublicationPage/ResultForm.tsx b/lib/components/ViewPublicationPage/ResultForm.tsx
index 85f206f..ab1291f 100644
--- a/lib/components/ViewPublicationPage/ResultForm.tsx
+++ b/lib/components/ViewPublicationPage/ResultForm.tsx
@@ -16,6 +16,8 @@ import type { QuizQuestionResult } from "@/model/questionTypes/result";
import QuizVideo from "@/ui_kit/VideoIframe/VideoIframe";
import { TextAccordion } from "./tools/TextAccordion";
import { PointSystemResultList } from "./PointSystemResultList";
+import { enqueueSnackbar } from "notistack";
+import { sendFC } from "@/api/quizRelase";
type ResultFormProps = {
resultQuestion: QuizQuestionResult;
@@ -25,7 +27,7 @@ export const ResultForm = ({ resultQuestion }: ResultFormProps) => {
const theme = useTheme();
const isMobile = useRootContainerSize() < 650;
const isTablet = useRootContainerSize() < 1000;
- const { settings, show_badge, quizId } = useQuizSettings();
+ const { settings, show_badge, quizId, preview } = useQuizSettings();
const setCurrentQuizStep = useQuizViewStore((state) => state.setCurrentQuizStep);
const spec = settings.cfg.spec;
const vkMetrics = useVkMetricsGoals(settings.cfg.vkMetricsNumber);
@@ -36,6 +38,26 @@ export const ResultForm = ({ resultQuestion }: ResultFormProps) => {
yandexMetrics.resultIdShown(resultQuestion.id);
}, [resultQuestion.id, vkMetrics, yandexMetrics]);
+ useEffect(() => {
+ (async () => {
+ if (!settings.cfg.showfc) {
+ try {
+ await sendFC({
+ questionId: resultQuestion.id,
+ body: {},
+ qid: quizId,
+ preview,
+ });
+
+ const sessions = JSON.parse(localStorage.getItem("sessions") || "{}");
+ localStorage.setItem("sessions", JSON.stringify({ ...sessions, [quizId]: new Date().getTime() }));
+ } catch (e) {
+ enqueueSnackbar("Заявка не может быть отправлена");
+ }
+ }
+ })();
+ }, []);
+
return (