Commit fa3d05da authored by Jiwon Yoon's avatar Jiwon Yoon
Browse files

wlsWk

parent 8c2acaf7
......@@ -13,7 +13,6 @@ let Answers = []
let Solutions = [4, 3, 2]
function Quiz() {
localStorage.setItem('Solutions', JSON.stringify(Solutions))
const [question, setQuestion] = useState({
...QnA[0],
......@@ -32,6 +31,7 @@ function Quiz() {
setSelected(ev.target.value) //selected값 변경
Answers[question.N - 1] = Number(ev.target.id) + 1
localStorage.setItem('Answers', JSON.stringify(Answers))
console.log(Answers)
}
return (
......@@ -61,7 +61,7 @@ function Quiz() {
<span className="h2 font-weight-bold text-danger"> {selected}</span> {/* 선택한 보여줌 */}
<div className="text-center my-3"> {(question.page === QnA.length - 1)
? <Link to="/end">
<button className="btn btn-outline-success">제출</button>
<button className="btn btn-outline-success" onClick={localStorage.setItem('Solutions', JSON.stringify(Solutions))}>제출</button>
</Link>
: <button type="button" className="btn btn-outline-dark" onClick={handleQuestion}>다음</button>
}
......
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