import {Box, Typography} from "@mui/material"; import CustomCheckbox from "@ui_kit/CustomCheckbox"; import InfoIcon from "../../../assets/icons/InfoIcon"; import * as React from "react"; import CustomTextField from "@ui_kit/CustomTextField"; import {useParams} from "react-router-dom"; import {questionStore, updateQuestionsList} from "@root/questions"; interface Props { totalIndex: number, } export default function ResponseSettings({totalIndex}: Props) { const params = Number(useParams().quizId); const {listQuestions} = questionStore() const [checked, setChecked] = React.useState([true, false]); const handleChange = (event: React.ChangeEvent) => { setChecked([checked[0], event.target.checked, ]); }; return ( Настройки ответов { let clonContent = listQuestions[totalIndex].content clonContent.multi = e.target.checked updateQuestionsList( totalIndex, {content: clonContent}) }} /> { let clonContent = listQuestions[totalIndex].content clonContent.own = e.target.checked updateQuestionsList(totalIndex, {content: clonContent}) }} /> Настройки вопросов { updateQuestionsList(totalIndex, {required: !e.target.checked}) console.log(listQuestions[totalIndex].required)}}/> {checked[1] ? updateQuestionsList(totalIndex, {description: e.target.value})}/> : <> } ); };