From 50a161738812c656f230e1818d18d079df52f0e4 Mon Sep 17 00:00:00 2001 From: Nastya Date: Mon, 6 Oct 2025 16:19:11 +0300 Subject: [PATCH] add crutch --- .../ContactForm/ContactTextBlock/index.tsx | 7 ++- .../PointSystemResultList.tsx | 1 - .../ViewPublicationPage/ResultForm.tsx | 50 ++++++++++--------- .../StartPageViewPublication/index.tsx | 17 +++---- .../questions/Variant/index.tsx | 12 ++++- lib/utils/defineDomain.ts | 3 +- 6 files changed, 51 insertions(+), 39 deletions(-) diff --git a/lib/components/ViewPublicationPage/ContactForm/ContactTextBlock/index.tsx b/lib/components/ViewPublicationPage/ContactForm/ContactTextBlock/index.tsx index 1240c71..5f94d60 100644 --- a/lib/components/ViewPublicationPage/ContactForm/ContactTextBlock/index.tsx +++ b/lib/components/ViewPublicationPage/ContactForm/ContactTextBlock/index.tsx @@ -8,6 +8,9 @@ type ContactTextBlockProps = { settings: QuizSettingsConfig; }; +const pathOnly = window.location.pathname; +const isCrutchNoDraw = pathOnly === "/28525cd7-9ddf-4c4a-a55b-e3d2f7d47583"; + export const ContactTextBlock: FC = ({ settings }) => { const theme = useTheme(); const isMobile = useRootContainerSize() < 850; @@ -47,7 +50,9 @@ export const ContactTextBlock: FC = ({ settings }) => { wordBreak: "break-word", }} > - {settings.cfg.formContact.title || t("Fill out the form to receive your test results")} + {isCrutchNoDraw + ? "Заполните форму, чтобы отправить ваши ответы" + : settings.cfg.formContact.title || t("Fill out the form to receive your test results")} {settings.cfg.formContact.desc && ( { return true; } }); - return ( { > {pointsSum} {t("of")} {totalQuestions} - - {t("View answers")} - - } - sx={{ - mt: "60px", - width: "100%", - }} - > - + {t("View answers")} + + } sx={{ - mt: "25px", + mt: "60px", + width: "100%", }} > - - - + + + + + )} )} diff --git a/lib/components/ViewPublicationPage/StartPageViewPublication/index.tsx b/lib/components/ViewPublicationPage/StartPageViewPublication/index.tsx index 5985654..a6636b3 100644 --- a/lib/components/ViewPublicationPage/StartPageViewPublication/index.tsx +++ b/lib/components/ViewPublicationPage/StartPageViewPublication/index.tsx @@ -19,6 +19,9 @@ import QuizVideo from "@/ui_kit/VideoIframe/VideoIframe"; import { isProduction } from "@/utils/defineDomain"; +const pathOnly = window.location.pathname; +const isCrutchNoDraw = pathOnly === "/28525cd7-9ddf-4c4a-a55b-e3d2f7d47583"; + export const StartPageViewPublication = () => { const theme = useTheme(); const { settings, show_badge, quizId, questions } = useQuizStore(); @@ -39,15 +42,6 @@ export const StartPageViewPublication = () => { yandexMetrics.phoneNumberOpened(); }; - console.log("------------------------------------------------"); - console.log("Background type:", settings.cfg.startpage.background.type); - console.log("Is image type:", settings.cfg.startpage.background.type === "image"); - console.log("Is video type:", settings.cfg.startpage.background.type === "video"); - console.log("Video URL:", settings.cfg.startpage.background.video); - console.log("Desktop background:", settings.cfg.startpage.background.desktop); - console.log("Startpage type:", settings.cfg.startpageType); - console.log("------------------------------------------------"); - const background = settings.cfg.startpage.background.type === "image" ? ( { margin: "12px 0 30px", overflowWrap: "break-word", width: "100%", - textAlign: - settings.cfg.startpageType === "centered" || settings.cfg.startpage.position === "center" + textAlign: isCrutchNoDraw + ? "justify" + : settings.cfg.startpageType === "centered" || settings.cfg.startpage.position === "center" ? "center" : "-moz-initial", color: settings.cfg.startpageType === "expanded" ? "white" : theme.palette.text.primary, diff --git a/lib/components/ViewPublicationPage/questions/Variant/index.tsx b/lib/components/ViewPublicationPage/questions/Variant/index.tsx index e6c1149..1412e7e 100644 --- a/lib/components/ViewPublicationPage/questions/Variant/index.tsx +++ b/lib/components/ViewPublicationPage/questions/Variant/index.tsx @@ -16,6 +16,8 @@ type VariantProps = { const pathOnly = window.location.pathname; const isCrutchImg = pathOnly === "/28525cd7-9ddf-4c4a-a55b-e3d2f7d47583"; + +const isCrutchNoDraw = pathOnly === "/28525cd7-9ddf-4c4a-a55b-e3d2f7d47583"; // 23.02.2025 const crutchlist = { 115048: { x: 629, y: 491 }, @@ -49,6 +51,7 @@ export const Variant = ({ currentQuestion }: VariantProps) => { const theme = useTheme(); const isMobile = useRootContainerSize() < 650; const isTablet = useRootContainerSize() < 850; + const isDesctop = useRootContainerSize() > 900; const answers = useQuizViewStore((state) => state.answers); const ownVariants = useQuizViewStore((state) => state.ownVariants); const updateOwnVariant = useQuizViewStore((state) => state.updateOwnVariant); @@ -145,14 +148,19 @@ export const Variant = ({ currentQuestion }: VariantProps) => { sx={{ maxWidth: "400px", width: "100%", - height: "300px", + height: isCrutchNoDraw ? "500px" : "300px", }} onClick={(event) => event.preventDefault()} > diff --git a/lib/utils/defineDomain.ts b/lib/utils/defineDomain.ts index 94278b9..53c9f26 100644 --- a/lib/utils/defineDomain.ts +++ b/lib/utils/defineDomain.ts @@ -13,6 +13,7 @@ const isProduction = !( //туризм больше не в исключениях if (!isProduction) domain = "https://s.hbpn.link"; -// domain = "https://hbpn.link"; + +domain = "https://hbpn.link"; export { domain, isProduction };