import { useParams } from "react-router-dom"; import { Box, Typography, Tooltip } from "@mui/material"; import CustomCheckbox from "@ui_kit/CustomCheckbox"; import CustomTextField from "@ui_kit/CustomTextField"; import { questionStore, updateQuestionsList } from "@root/questions"; import InfoIcon from "../../../assets/icons/InfoIcon"; type SettingPageOptionsProps = { totalIndex: number; }; export default function SettingPageOptions({ totalIndex, }: SettingPageOptionsProps) { const quizId = Number(useParams().quizId); const { listQuestions } = questionStore(); return ( Настройки вопроса 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, }); }} /> )} ); }