query functions for response options
This commit is contained in:
parent
51f3469031
commit
e961d53d6c
5 changed files with 106 additions and 17 deletions
|
|
@ -13,12 +13,16 @@ export interface Question {
|
|||
id: number;
|
||||
text: string;
|
||||
questionType: 'singleanswerquestion' | 'multipleanswerquestion';
|
||||
answerVariants?: {
|
||||
id?: number;
|
||||
text: string;
|
||||
}[];
|
||||
}
|
||||
|
||||
const QuestionsList: React.FC<QuestionsListProps> = ({questions, setQuestions, surveyId}) => {
|
||||
const [selectedType, setSelectedType] = useState<'single' | 'multiply'>('single');
|
||||
|
||||
const [localQuestionId, setLocalQuestionId] = useState(1001); // Начинаем с 2, так как первый вопрос имеет ID=1
|
||||
const [localQuestionId, setLocalQuestionId] = useState(2);
|
||||
|
||||
const handleAddQuestion = () => {
|
||||
const newQuestion: Question = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue