Commit 18b1b00e authored by baesangjune's avatar baesangjune
Browse files

quiz

parent 75b9c5fa
...@@ -18,7 +18,7 @@ class Quiz extends React.Component { ...@@ -18,7 +18,7 @@ class Quiz extends React.Component {
this.state = { ...question[0], i: 0, v: "", r: 0, c: "" } this.state = { ...question[0], i: 0, v: "", r: 0, c: "" }
} }
ShowQuiz() { ShowQuiz() {
this.setState({ r: 1 }) this.setState({ r: 1 })
} }
setQuestion() { setQuestion() {
this.setState({ ...question[this.state.i + 1], i: this.state.i + 1, v: "" }) this.setState({ ...question[this.state.i + 1], i: this.state.i + 1, v: "" })
...@@ -59,8 +59,6 @@ class Quiz extends React.Component { ...@@ -59,8 +59,6 @@ class Quiz extends React.Component {
{/* <div> {/* <div>
<input type="text" value={this.state.v} name="A" onChange={this.setAnswer} /> <input type="text" value={this.state.v} name="A" onChange={this.setAnswer} />
</div> */} </div> */}
{localStorage.setItem('Answer1', this.question[0].A),
localStorage.getItem('Answer1')}
<button type="button" onClick={this.setQuestion}>다음 문제로</button> <button type="button" onClick={this.setQuestion}>다음 문제로</button>
</div> </div>
) )
......
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