diff --git a/src/pages/ResultPage/ResultSettings.tsx b/src/pages/ResultPage/ResultSettings.tsx index e583995e..5b594188 100644 --- a/src/pages/ResultPage/ResultSettings.tsx +++ b/src/pages/ResultPage/ResultSettings.tsx @@ -59,7 +59,9 @@ export const ResultSettings = () => { useEffect(() => { //Всегда должен существовать хоть 1 резулт - "line" if ( - !questions?.find( (q) => (q.type === "result" && q.content.rule.parentId === "line")) + !questions?.find( + (q) => q.type === "result" && q.content.rule.parentId === "line", + ) ) { createResult(quiz?.backendId, "line"); console.log("Я не нашёл линейный резулт и собираюсь создать новый"); diff --git a/src/pages/ViewPublicationPage/Question.tsx b/src/pages/ViewPublicationPage/Question.tsx index fe54fce5..ca89e611 100644 --- a/src/pages/ViewPublicationPage/Question.tsx +++ b/src/pages/ViewPublicationPage/Question.tsx @@ -1,5 +1,5 @@ import { useState, useEffect } from "react"; -import { Box, useTheme } from "@mui/material"; +import { Box, useMediaQuery, useTheme } from "@mui/material"; import { useCurrentQuiz } from "@root/quizes/hooks"; import { getQuestionByContentId } from "@root/questions/actions"; @@ -46,6 +46,8 @@ const QUESTIONS_MAP: any = { export const Question = ({ questions }: QuestionProps) => { const quiz = useCurrentQuiz(); + const theme = useTheme(); + const isMobile = useMediaQuery(theme.breakpoints.down(650)); const [currentQuestion, setCurrentQuestion] = useState(); const [showContactForm, setShowContactForm] = useState(false); @@ -67,13 +69,13 @@ export const Question = ({ questions }: QuestionProps) => { const QuestionComponent = QUESTIONS_MAP[currentQuestion.type as Exclude]; - const theme = useTheme(); + return ( {!showContactForm && !showResultForm && ( export const updateSomeWorkBackend = (someWorkBackend: boolean) => useUiTools.setState({ someWorkBackend }); - + export const updateNextStep = (nextStep: number) => useUiTools.setState({ nextStep }); diff --git a/src/stores/uiTools/store.ts b/src/stores/uiTools/store.ts index 122ccbf9..d42e0e50 100644 --- a/src/stores/uiTools/store.ts +++ b/src/stores/uiTools/store.ts @@ -12,7 +12,7 @@ export type UiTools = { deleteNodeId: string | null; showConfirmLeaveModal: boolean; someWorkBackend: boolean; - nextStep: number + nextStep: number; }; export type WhyCantCreatePublic = { @@ -31,7 +31,7 @@ const initialState: UiTools = { deleteNodeId: null, showConfirmLeaveModal: false, someWorkBackend: false, - nextStep: -1 + nextStep: -1, }; export const useUiTools = create()( diff --git a/src/ui_kit/Modal/CropModal.tsx b/src/ui_kit/Modal/CropModal.tsx index 9d6b2988..eac43cef 100644 --- a/src/ui_kit/Modal/CropModal.tsx +++ b/src/ui_kit/Modal/CropModal.tsx @@ -173,7 +173,8 @@ export const CropModal: FC = ({ height: isMobile ? "80vh" : undefined, display: isMobile ? "flex" : undefined, flexDirection: isMobile ? "column" : undefined, - justifyContent: isMobile ? "space-evenly" : undefined, + justifyContent: isMobile ? "flex-start" : undefined, + overflow: isMobile ? "auto" : undefined, }} >