diff --git a/src/view/addExam/components/addQuestion.js b/src/view/addExam/components/addQuestion.js new file mode 100644 index 0000000..c6486e5 --- /dev/null +++ b/src/view/addExam/components/addQuestion.js @@ -0,0 +1,79 @@ +import React, { useEffect, useState } from "react"; + +const AddQuestionPopUp = ({ submitOnClick, nameOnChange, questionQuantityOnChange, coefficientOnChange, closeOnClick }) => { + + const [answer, setAnswer] = useState(null); + const [numberOfOptions, setNumberOfOptions] = useState(null); + const [options, setOptions] = useState([]) + useEffect(() => { + const arr = []; + for (var i = 1; i <= numberOfOptions; i++) { + arr.push({ + id: i, + title: '', + isAnswer: false + }) + } + setOptions(arr) + }, [numberOfOptions]) + + return ( +