minor fixes
remove console clutter fix types
This commit is contained in:
parent
d20c249796
commit
4e915f3e39
@ -8,22 +8,25 @@ import {
|
||||
IconButton,
|
||||
InputAdornment,
|
||||
Popover,
|
||||
TextField,
|
||||
TextField as MuiTextField,
|
||||
useMediaQuery,
|
||||
useTheme,
|
||||
TextFieldProps,
|
||||
} from "@mui/material";
|
||||
import {
|
||||
addQuestionVariant,
|
||||
deleteQuestionVariant,
|
||||
setQuestionVariantField,
|
||||
} from "@root/questions/actions";
|
||||
import type { ChangeEvent, KeyboardEvent, ReactNode } from "react";
|
||||
import type { ChangeEvent, FC, KeyboardEvent, ReactNode } from "react";
|
||||
import { useState } from "react";
|
||||
import { Draggable } from "react-beautiful-dnd";
|
||||
import type { QuestionVariant } from "../../../model/questionTypes/shared";
|
||||
import { useDebouncedCallback } from "use-debounce";
|
||||
import { enqueueSnackbar } from "notistack";
|
||||
|
||||
const TextField = MuiTextField as unknown as FC<TextFieldProps>;
|
||||
|
||||
type AnswerItemProps = {
|
||||
index: number;
|
||||
questionId: string;
|
||||
@ -60,7 +63,6 @@ export const AnswerItem = ({
|
||||
const handleClose = () => {
|
||||
setIsOpen(false);
|
||||
};
|
||||
console.log(variant);
|
||||
|
||||
return (
|
||||
<Draggable draggableId={String(index)} index={index}>
|
||||
|
||||
@ -24,7 +24,6 @@ export default function SettingOptionsAndPict({
|
||||
const isFigmaTablte = useMediaQuery(theme.breakpoints.down(990));
|
||||
const isMobile = useMediaQuery(theme.breakpoints.down(680));
|
||||
|
||||
console.log("question.content.replText ", question.content.replText);
|
||||
const setReplText = useDebouncedCallback((replText) => {
|
||||
updateQuestion(question.id, (question) => {
|
||||
if (question.type !== "varimg") return;
|
||||
|
||||
@ -59,7 +59,6 @@ export default function EditPage({
|
||||
const quiz = useCurrentQuiz();
|
||||
const { editQuizId } = useQuizStore();
|
||||
const { questions } = useQuestionsStore();
|
||||
console.log(questions);
|
||||
const { whyCantCreatePublic, showConfirmLeaveModal, nextStep } = useUiTools();
|
||||
const theme = useTheme();
|
||||
const navigate = useNavigate();
|
||||
@ -114,7 +113,6 @@ export default function EditPage({
|
||||
const isConditionMet =
|
||||
[1].includes(currentStep) && quizConfig.type !== "form";
|
||||
|
||||
console.log("quiz", quiz);
|
||||
return (
|
||||
<>
|
||||
<Box
|
||||
|
||||
@ -36,14 +36,16 @@ export const ModalInfoWhyCantCreate = () => {
|
||||
overflow: "auto",
|
||||
}}
|
||||
>
|
||||
{Object.values(whyCantCreatePublic).map((data) => {
|
||||
{Object.entries(whyCantCreatePublic).map(([id, data]) => {
|
||||
return (
|
||||
<Box>
|
||||
<Box key={id}>
|
||||
<Typography color="#7e2aea">
|
||||
{data.name === "quiz" ? "У квиза" : `У вопроса "${data.name}"`}
|
||||
</Typography>
|
||||
{data.problems.map((problem) => (
|
||||
<Typography p="5px 0">{problem}</Typography>
|
||||
{data.problems.map((problem, index) => (
|
||||
<Typography key={index} p="5px 0">
|
||||
{problem}
|
||||
</Typography>
|
||||
))}
|
||||
<Divider />
|
||||
</Box>
|
||||
|
||||
@ -29,7 +29,7 @@ import { replaceEmptyLinesToSpace } from "../../utils/replaceEmptyLinesToSpace";
|
||||
import { useQuizPreviewStore } from "@root/quizPreview";
|
||||
import { useQuizStore } from "@root/quizes/store";
|
||||
|
||||
export const setQuestions = (questions: RawQuestion[] | null) =>
|
||||
export const setQuestions = (questions: RawQuestion[] | null | undefined) =>
|
||||
setProducedState(
|
||||
(state) => {
|
||||
const untypedResultQuestions = state.questions.filter(
|
||||
@ -632,7 +632,7 @@ export const clearRuleForAll = () => {
|
||||
};
|
||||
|
||||
export const createResult = async (
|
||||
quizId: number | null,
|
||||
quizId: number | null | undefined,
|
||||
parentContentId?: string,
|
||||
) =>
|
||||
requestQueue.enqueue(async () => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user