Commit 109ab3ca authored by Jiwon Yoon's avatar Jiwon Yoon
Browse files

a

parent ab596d53
......@@ -12,9 +12,9 @@ const QnA = [
let Answers = [0,0,0]
localStorage.setItem('Answers', JSON.stringify(Answers))
let Solutions = [4, 3, 2]
localStorage.setItem('Solutions', JSON.stringify(Solutions))
function Quiz() {
const [question, setQuestion] = useState({
...QnA[0],
i: 0,
......@@ -26,11 +26,10 @@ function Quiz() {
function handleQuestion() {
setQuestion({ ...QnA[question.i + 1], i: question.i + 1, page: question.page + 1 })
setSelected("") //페이지 넘어가면 Your Answer 초기화
setSelected("") //페이지 넘어가면 selected 초기화
}
let handleChange = (ev) => {
// ev.preventDefault() //새로고침 안되도록
setSelected(ev.target.value) //selected값 변경
Answers[question.N - 1] = Number(ev.target.id) + 1
localStorage.setItem('Answers', JSON.stringify(Answers))
......@@ -69,7 +68,7 @@ function Quiz() {
</div>
<p className="h3 text-center text-danger ">
<Timer
initialTime={36000}
initialTime={30010}
direction="backward"
checkpoints={[
{time:1,
......@@ -84,7 +83,7 @@ function Quiz() {
>
{() => (
<>
<Timer.Minutes /> : <Timer.Seconds></Timer.Seconds> / 60 : 00 </>
<Timer.Minutes /> : <Timer.Seconds></Timer.Seconds> / 30 : 00 </>
)}
</Timer> {/* npm i react-compound-timer */}
</p>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment