удалены кнопки-стройки из инсталла опросника, футер определяет резулт?
This commit is contained in:
parent
52940e60a5
commit
010d2262b6
@ -247,16 +247,6 @@ export default function InstallQuiz() {
|
||||
<Typography sx={{ color: "#FC712F" }}>Не опубликован</Typography>
|
||||
</Box>
|
||||
</Paper>
|
||||
<Button>Тестовый просмотр</Button>
|
||||
<Button
|
||||
onClick={() => {
|
||||
updateQuiz(
|
||||
quiz?.id, (state) => {
|
||||
state.status = quiz?.status === "start" ? "stop" : "start"
|
||||
}
|
||||
)
|
||||
}}
|
||||
>{quiz?.status === "start" ? "Стоп" : "Старт"}</Button>
|
||||
</Box>
|
||||
</>
|
||||
)
|
||||
|
@ -1,12 +1,13 @@
|
||||
import { Box, Typography } from "@mui/material";
|
||||
|
||||
export const ApologyPage = (message: string) => {
|
||||
export const ApologyPage = ({message}:{message: string}) => {
|
||||
return (
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "center"
|
||||
justifyContent: "center",
|
||||
height: "100vh"
|
||||
}}
|
||||
>
|
||||
<Typography
|
||||
|
@ -152,7 +152,9 @@ export const Footer = ({ setCurrentQuestion, question, setShowContactForm, setSh
|
||||
const questionIndex = questions.findIndex(({ id }) => id === question.id);
|
||||
const nextQuestion = questions[questionIndex + 1];
|
||||
|
||||
console.log("questionIndex ", questionIndex);
|
||||
console.log(nextQuestion);
|
||||
console.log(questions);
|
||||
if (nextQuestion && nextQuestion.type !== "result") {
|
||||
console.log("следующий вопрос результирующий ", nextQuestion.type === "result");
|
||||
setCurrentQuestion(nextQuestion);
|
||||
|
@ -98,7 +98,7 @@ export const Question = ({ questions }: QuestionProps) => {
|
||||
/>
|
||||
)}
|
||||
{showResultForm && quiz?.config.resultInfo.when === "after" && (
|
||||
<ReвторойsultForm
|
||||
<ResultForm
|
||||
currentQuestion={currentQuestion}
|
||||
showContactForm={showContactForm}
|
||||
setShowContactForm={setShowContactForm}
|
||||
|
@ -3,6 +3,7 @@ import SectionWrapper from "@ui_kit/SectionWrapper";
|
||||
import ComplexNavText from "./ComplexNavText";
|
||||
import { createQuiz } from "@root/quizes/actions";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { resetEditConfig } from "@root/quizes/actions";
|
||||
|
||||
|
||||
export default function FirstQuiz() {
|
||||
@ -29,7 +30,10 @@ export default function FirstQuiz() {
|
||||
<Button
|
||||
variant="contained"
|
||||
data-cy="create-quiz"
|
||||
onClick={() => createQuiz(navigate)}
|
||||
onClick={() => {
|
||||
resetEditConfig()
|
||||
createQuiz(navigate)
|
||||
}}
|
||||
>
|
||||
Создать +
|
||||
</Button>
|
||||
|
@ -4,6 +4,7 @@ import { useQuizes } from "@root/quizes/hooks";
|
||||
import SectionWrapper from "@ui_kit/SectionWrapper";
|
||||
import React from "react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { resetEditConfig } from "@root/quizes/actions";
|
||||
import ComplexNavText from "./ComplexNavText";
|
||||
import FirstQuiz from "./FirstQuiz";
|
||||
import QuizCard from "./QuizCard";
|
||||
@ -42,7 +43,10 @@ export default function MyQuizzesFull({ outerContainerSx: sx, children }: Props)
|
||||
padding: isMobile ? "10px" : "10px 47px",
|
||||
minWidth: "44px",
|
||||
}}
|
||||
onClick={() => createQuiz(navigate)}
|
||||
onClick={() => {
|
||||
resetEditConfig();
|
||||
createQuiz(navigate)
|
||||
}}
|
||||
data-cy="create-quiz"
|
||||
>
|
||||
{isMobile ? "+" : "Создать +"}
|
||||
|
@ -27,7 +27,7 @@ import Stepper from "@ui_kit/Stepper";
|
||||
import SwitchStepPages from "@ui_kit/switchStepPages";
|
||||
import { isAxiosError } from "axios";
|
||||
import { enqueueSnackbar } from "notistack";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import React, { useEffect, useLayoutEffect, useState } from "react";
|
||||
import { Link, useNavigate } from "react-router-dom";
|
||||
import useSWR from "swr";
|
||||
import { SidebarMobile } from "./Sidebar/SidebarMobile";
|
||||
@ -77,6 +77,7 @@ export default function EditPage() {
|
||||
},
|
||||
[]
|
||||
);
|
||||
console.log(currentStep)
|
||||
|
||||
return (
|
||||
<>
|
||||
|
Loading…
Reference in New Issue
Block a user