Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
students
online-quiz-react
Commits
18b1b00e
Commit
18b1b00e
authored
Jul 27, 2020
by
baesangjune
Browse files
quiz
parent
75b9c5fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Quiz.js
View file @
18b1b00e
...
@@ -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
>
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment