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

a

parent d8653078
...@@ -31,14 +31,12 @@ class Quiz extends React.Component { ...@@ -31,14 +31,12 @@ class Quiz extends React.Component {
this.setState({ page: 1, list: list }) this.setState({ page: 1, list: list })
} }
setQuestion() { setQuestion() {
this.setState({ ...question[this.state.i + 1], i: this.state.i + 1 })
let list = this.state.Choose.map((a) => let list = this.state.Choose.map((a) =>
<div> <div>
<input type="radio" name={a} id={a} value={a} /> <input type="radio" name={a} id={a} value={a} />
<label for={a}>{a}</label> <label for={a}>{a}</label>
</div>) </div>)
this.setState({ list: list }) this.setState({ ...question[this.state.i + 1], i: this.state.i + 1,list: list })
} }
// setAnswer(e) { // setAnswer(e) {
...@@ -60,7 +58,7 @@ class Quiz extends React.Component { ...@@ -60,7 +58,7 @@ class Quiz extends React.Component {
return ( return (
<div className="Quiz"> <div className="Quiz">
<h2>Q:{this.state.Q}</h2> <h2>Q:{this.state.Q}</h2>
<div> <div>{this.state.list}
</div> </div>
<div className="App"> <div className="App">
정답을 입력하세요 정답을 입력하세요
......
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