import { useParams } from "react-router-dom"; import { Box, Typography } from "@mui/material"; import CustomCheckbox from "@ui_kit/CustomCheckbox"; import CustomTextField from "@ui_kit/CustomTextField"; import InfoIcon from "../../../assets/icons/InfoIcon"; import { questionStore, updateQuestionsList } from "@root/questions"; type SettingOptionsAndPictProps = { totalIndex: number; }; export default function SettingOptionsAndPict({ totalIndex, }: SettingOptionsAndPictProps) { const quizId = Number(useParams().quizId); const { listQuestions } = questionStore(); return ( <> Настройки ответов { updateQuestionsList(quizId, totalIndex, { content: { ...listQuestions[quizId][totalIndex].content, own: target.checked, }, }); }} /> Текст-заглушка на картинке { updateQuestionsList(quizId, totalIndex, { content: { ...listQuestions[quizId][totalIndex].content, replText: target.value, }, }); }} /> Настройки вопросов { updateQuestionsList(quizId, totalIndex, { content: { ...listQuestions[quizId][totalIndex].content, required: target.checked, }, }); }} /> { updateQuestionsList(quizId, totalIndex, { content: { ...listQuestions[quizId][totalIndex].content, innerNameCheck: target.checked, innerName: "", }, }); }} />{" "} {listQuestions[quizId][totalIndex].content.innerNameCheck && ( { let clonContent = listQuestions[quizId][totalIndex].content; clonContent.innerName = target.value; updateQuestionsList(quizId, totalIndex, { content: clonContent, }); }} /> )} ); }