add page completing survey
This commit is contained in:
parent
8182bc1c43
commit
4f1a7cc434
15 changed files with 333 additions and 120 deletions
|
|
@ -0,0 +1,32 @@
|
|||
import SurveyInfo from "../SurveyInfo/SurveyInfo.tsx";
|
||||
import QuestionsList, {Question} from "../QuestionsList/QuestionsList.tsx";
|
||||
import {useState} from "react";
|
||||
import styles from './CompletingSurvey.module.css'
|
||||
|
||||
export const CompletingSurvey = () => {
|
||||
const [titleSurvey, setTitleSurvey] = useState("Название опроса");
|
||||
const [descriptionSurvey, setDescriptionSurvey] = useState("");
|
||||
const [questions, setQuestions] = useState<Question[]>([
|
||||
{ id: 1, text: 'Вопрос 1', questionType: 'SingleAnswerQuestion', answerVariants: [{ id: 1, text: 'Ответ 1' },
|
||||
{ id: 2, text: 'Ответ 1' }, { id: 3, text: 'Ответ 1' }]},
|
||||
{ id: 2, text: 'Вопрос 2', questionType: 'MultipleAnswerQuestion', answerVariants: [{ id: 1, text: 'Ответ 1' },
|
||||
{ id: 2, text: 'Ответ 1' }, { id: 3, text: 'Ответ 1' }]}
|
||||
]);
|
||||
|
||||
return (
|
||||
<div className={styles.survey}>
|
||||
<SurveyInfo
|
||||
titleSurvey={titleSurvey}
|
||||
descriptionSurvey={descriptionSurvey}
|
||||
setDescriptionSurvey={setDescriptionSurvey}
|
||||
setTitleSurvey={setTitleSurvey}
|
||||
/>
|
||||
<QuestionsList
|
||||
questions={questions}
|
||||
setQuestions={setQuestions}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default CompletingSurvey
|
||||
Loading…
Add table
Add a link
Reference in a new issue