refactor: form
This commit is contained in:
parent
2f9bc4decd
commit
935f26695e
@ -1,17 +1,6 @@
|
||||
import { useState, useRef, useEffect } from "react";
|
||||
import { useParams } from "react-router-dom";
|
||||
import {
|
||||
Box,
|
||||
Checkbox,
|
||||
FormControl,
|
||||
FormControlLabel,
|
||||
IconButton,
|
||||
InputAdornment,
|
||||
Paper,
|
||||
TextField,
|
||||
useMediaQuery,
|
||||
useTheme,
|
||||
} from "@mui/material";
|
||||
import { Box, InputAdornment, Paper } from "@mui/material";
|
||||
import { useDebouncedCallback } from "use-debounce";
|
||||
|
||||
import CustomTextField from "@ui_kit/CustomTextField";
|
||||
@ -19,22 +8,9 @@ import { ChooseAnswerModal } from "./ChooseAnswerModal";
|
||||
import FormTypeQuestions from "../FormTypeQuestions";
|
||||
import SwitchQuestionsPage from "../../SwitchQuestionsPage";
|
||||
|
||||
import {
|
||||
questionStore,
|
||||
updateQuestionsList,
|
||||
createQuestion,
|
||||
copyQuestion,
|
||||
removeQuestion,
|
||||
removeQuestionForce,
|
||||
} from "@root/questions";
|
||||
import { questionStore, updateQuestionsList } from "@root/questions";
|
||||
|
||||
import ExpandLessIcon from "@mui/icons-material/ExpandLess";
|
||||
import { DeleteIcon } from "@icons/questionsPage/deleteIcon";
|
||||
import { OneIcon } from "@icons/questionsPage/OneIcon";
|
||||
import { PointsIcon } from "@icons/questionsPage/PointsIcon";
|
||||
import { CopyIcon } from "@icons/questionsPage/CopyIcon";
|
||||
import { CrossedEyeIcon } from "@icons/CrossedEyeIcon";
|
||||
import { HideIcon } from "@icons/questionsPage/hideIcon";
|
||||
import Answer from "@icons/questionsPage/answer";
|
||||
import OptionsPict from "@icons/questionsPage/options_pict";
|
||||
import OptionsAndPict from "@icons/questionsPage/options_and_pict";
|
||||
@ -47,8 +23,6 @@ import Download from "@icons/questionsPage/download";
|
||||
import Page from "@icons/questionsPage/page";
|
||||
import RatingIcon from "@icons/questionsPage/rating";
|
||||
import AnswerGroup from "@icons/questionsPage/answerGroup";
|
||||
import { ArrowDownIcon } from "@icons/questionsPage/ArrowDownIcon";
|
||||
import { ReactComponent as PlusIcon } from "../../../../assets/icons/plus.svg";
|
||||
|
||||
import type { DraggableProvidedDragHandleProps } from "react-beautiful-dnd";
|
||||
import type { QuizQuestionBase } from "../../../../model/questionTypes/shared";
|
||||
@ -107,12 +81,8 @@ export default function QuestionsPageCard({
|
||||
draggableProps,
|
||||
isDragging,
|
||||
}: Props) {
|
||||
const [plusVisible, setPlusVisible] = useState<boolean>(false);
|
||||
const [open, setOpen] = useState<boolean>(false);
|
||||
const quizId = Number(useParams().quizId);
|
||||
const theme = useTheme();
|
||||
const isTablet = useMediaQuery(theme.breakpoints.down(1000));
|
||||
const isMobile = useMediaQuery(theme.breakpoints.down(790));
|
||||
const { listQuestions } = questionStore();
|
||||
const question = listQuestions[quizId][totalIndex] as QuizQuestionBase;
|
||||
const anchorRef = useRef(null);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Box, Button, IconButton, Typography, useTheme } from "@mui/material";
|
||||
import { Box, Button, Typography, useTheme } from "@mui/material";
|
||||
import { useParams } from "react-router-dom";
|
||||
|
||||
import { FormDraggableList } from "./FormDraggableList";
|
||||
@ -10,7 +10,6 @@ import {
|
||||
} from "@root/questions";
|
||||
import { quizStore } from "@root/quizes";
|
||||
|
||||
import AddPlus from "../../../assets/icons/questionsPage/addPlus";
|
||||
import ArrowLeft from "../../../assets/icons/questionsPage/arrowLeft";
|
||||
import AddAnswer from "../../../assets/icons/questionsPage/addAnswer";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user