From 9a34ef01de1a84732f6d8ce794171ccbae4d6881 Mon Sep 17 00:00:00 2001 From: Nastya Date: Sun, 22 Dec 2024 14:49:56 +0300 Subject: [PATCH] v1.0.57 --- lib/components/QuizAnswerer.tsx | 11 ----------- lib/components/ViewPublicationPage/Question.tsx | 2 +- .../ViewPublicationPage/ViewPublicationPage.tsx | 12 ++++++++++++ .../ViewPublicationPage/questions/Date/DateRange.tsx | 2 +- .../questions/Variant/VariantItem.tsx | 2 +- lib/ui_kit/unscreen.ts | 1 + package.json | 2 +- 7 files changed, 17 insertions(+), 15 deletions(-) diff --git a/lib/components/QuizAnswerer.tsx b/lib/components/QuizAnswerer.tsx index ecee814..9a9c231 100644 --- a/lib/components/QuizAnswerer.tsx +++ b/lib/components/QuizAnswerer.tsx @@ -21,7 +21,6 @@ import ViewPublicationPage from "./ViewPublicationPage/ViewPublicationPage"; import { HelmetProvider } from "react-helmet-async"; import "moment/dist/locale/ru"; -import unscreen from "@/ui_kit/unscreen"; moment.locale("ru"); const localeText = ruRU.components.MuiLocalizationProvider.defaultProps.localeText; @@ -127,16 +126,6 @@ function QuizAnswererInner({ ); } export default function QuizAnswerer(props: Props) { - useEffect(() => { - const root = document.getElementById("root"); - const overlay = document.getElementById("hideoverlay"); - - if (root !== null && overlay !== null && props.quizSettings?.settings.cfg?.isUnSc) { - overlay.style.cssText = - "position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: black; z-index:999; opacity: 0;"; - unscreen(overlay, root); - } - }, []); return ( { const theme = useTheme(); const { settings, show_badge, quizId } = useQuizSettings(); - console.log(theme); + return ( { + const root = document.getElementById("root"); + const overlay = document.getElementById("hideoverlay"); + + if (root !== null && overlay !== null && settings.cfg?.isUnSc) { + overlay.style.cssText = + "position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: black; z-index:999; opacity: 0;"; + unscreen(overlay, root); + } + }, []); + useEffect( function setFaviconAndTitle() { if (!changeFaviconAndTitle) return; diff --git a/lib/components/ViewPublicationPage/questions/Date/DateRange.tsx b/lib/components/ViewPublicationPage/questions/Date/DateRange.tsx index a419a84..fdb7496 100644 --- a/lib/components/ViewPublicationPage/questions/Date/DateRange.tsx +++ b/lib/components/ViewPublicationPage/questions/Date/DateRange.tsx @@ -11,7 +11,7 @@ import { useRootContainerSize } from "@/contexts/RootContainerWidthContext"; type DateProps = { currentQuestion: QuizQuestionDate; }; -console.log(moment.locale()); + export default ({ currentQuestion }: DateProps) => { const theme = useTheme(); const isMobile = useRootContainerSize() < 690; diff --git a/lib/components/ViewPublicationPage/questions/Variant/VariantItem.tsx b/lib/components/ViewPublicationPage/questions/Variant/VariantItem.tsx index b73b770..565490a 100644 --- a/lib/components/ViewPublicationPage/questions/Variant/VariantItem.tsx +++ b/lib/components/ViewPublicationPage/questions/Variant/VariantItem.tsx @@ -32,7 +32,7 @@ const OwnInput = ({ questionId, variant, largeCheck, ownPlaceholder }: OwnInputP const { updateOwnVariant } = useQuizViewStore((state) => state); const ownAnswer = ownVariants[ownVariants.findIndex((v) => v.id === variant.id)]?.variant.answer || ""; - console.log(theme); + return largeCheck ? ( { + console.log("focus"); isWindowFocused = true; checkFocusAndMouse(); // Проверяем состояние }); // Когда окно получает фокус diff --git a/package.json b/package.json index 6c6600b..64dc7e1 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@frontend/squzanswerer", - "version": "1.0.56", + "version": "1.0.57", "type": "module", "main": "./dist-package/index.js", "module": "./dist-package/index.js",