diff --git a/lib/components/ViewPublicationPage/StartPageViewPublication/index.tsx b/lib/components/ViewPublicationPage/StartPageViewPublication/index.tsx index 0b1a9b2..155b1f7 100644 --- a/lib/components/ViewPublicationPage/StartPageViewPublication/index.tsx +++ b/lib/components/ViewPublicationPage/StartPageViewPublication/index.tsx @@ -8,18 +8,18 @@ import { useTheme, } from "@mui/material"; -import { QuizPreviewLayoutByType } from "./QuizPreviewLayoutByType"; +import {QuizPreviewLayoutByType} from "./QuizPreviewLayoutByType"; import YoutubeEmbedIframe from "../tools/YoutubeEmbedIframe"; -import { useQuizData } from "@contexts/QuizDataContext"; -import { useRootContainerSize } from "@contexts/RootContainerWidthContext"; +import {useQuizData} from "@contexts/QuizDataContext"; +import {useRootContainerSize} from "@contexts/RootContainerWidthContext"; -import { useUADevice } from "@utils/hooks/useUADevice"; -import { quizThemes } from "@utils/themes/Publication/themePublication"; +import {useUADevice} from "@utils/hooks/useUADevice"; +import {quizThemes} from "@utils/themes/Publication/themePublication"; -import { NameplateLogo } from "@icons/NameplateLogo"; -import { useQuizViewStore } from "@/stores/quizView"; -import { DESIGN_LIST } from "@/utils/designList"; +import {NameplateLogo} from "@icons/NameplateLogo"; +import {useQuizViewStore} from "@/stores/quizView"; +import {DESIGN_LIST} from "@/utils/designList"; export const StartPageViewPublication = () => { const theme = useTheme(); @@ -34,23 +34,23 @@ export const StartPageViewPublication = () => { const handleCopyNumber = () => { navigator.clipboard.writeText(settings.cfg.info.phonenumber); //@ts-ignore - let YM = window?.ym; + const YM = window?.ym; //@ts-ignore - let VP = window?._tmr; + const VP = window?._tmr; if (YM !== undefined && settings.cfg.yandexMetricNumber !== undefined) { YM( settings.cfg.yandexMetricNumber, "reachGoal", "penaquiz-phone" ); - }; + } if (VP !== undefined && settings.cfg.vkMetricNumber !== undefined) { VP.push({ type: "reachGoal", id: settings.cfg.vkMetricNumber, goal: "penaquiz-phone" }); - }; + } }; const background = @@ -292,23 +292,23 @@ export const StartPageViewPublication = () => { //@ts-ignore - let YM = window?.ym; + const YM = window?.ym; //@ts-ignore - let VP = window?._tmr; + const VP = window?._tmr; if (YM !== undefined && settings.cfg.yandexMetricNumber !== undefined) { YM( settings.cfg.yandexMetricNumber, "reachGoal", "penaquiz-startquiz" ); - }; + } if (VP !== undefined && settings.cfg.vkMetricNumber !== undefined) { VP.push({ type: "reachGoal", id: settings.cfg.vkMetricNumber, goal: "penaquiz-startquiz" }); - }; + } }} > {settings.cfg.startpage.button.trim() @@ -344,25 +344,26 @@ export const StartPageViewPublication = () => { }}> {settings.cfg.info.site && ( { //@ts-ignore - let YM = window?.ym; + const YM = window?.ym; //@ts-ignore - let VP = window?._tmr; + const VP = window?._tmr; if (YM !== undefined && settings.cfg.yandexMetricNumber !== undefined) { await YM( settings.cfg.yandexMetricNumber, "reachGoal", "penaquiz-email" ); - }; + } if (VP !== undefined && settings.cfg.vkMetricNumber !== undefined) { await VP.push({ type: "reachGoal", id: settings.cfg.vkMetricNumber, goal: "penaquiz-email" }); - }; + } location.href = ( settings.cfg.info.site.includes("https") ? settings.cfg.info.site @@ -404,7 +405,10 @@ export const StartPageViewPublication = () => { ) : ( - + { width: "100%", overflowWrap: "break-word", fontSize: "12px", - textAlign: settings.cfg.startpageType === "expanded" && settings.cfg.startpage.position === "center" ? "end" : "none", + textAlign: settings.cfg.startpageType === "expanded" && settings.cfg.startpage.position === "center" && !isMobile ? "end" : settings.cfg.startpageType === "expanded" && settings.cfg.startpage.position === "center" && isMobile || settings.cfg.startpageType === "centered" && isMobile ? "center" : "none", maxHeight: "120px", overflow: "auto", marginTop: "10px",