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
b38aece8
Commit
b38aece8
authored
Jul 27, 2020
by
Jiwon Yoon
Browse files
a
parent
d8653078
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Quiz.js
View file @
b38aece8
...
...
@@ -31,14 +31,12 @@ class Quiz extends React.Component {
this
.
setState
({
page
:
1
,
list
:
list
})
}
setQuestion
()
{
this
.
setState
({
...
question
[
this
.
state
.
i
+
1
],
i
:
this
.
state
.
i
+
1
})
let
list
=
this
.
state
.
Choose
.
map
((
a
)
=>
<
div
>
<
input
type
=
"
radio
"
name
=
{
a
}
id
=
{
a
}
value
=
{
a
}
/
>
<
label
for
=
{
a
}
>
{
a
}
<
/label
>
<
/div>
)
this
.
setState
({
list
:
list
})
<
div
>
<
input
type
=
"
radio
"
name
=
{
a
}
id
=
{
a
}
value
=
{
a
}
/
>
<
label
for
=
{
a
}
>
{
a
}
<
/label
>
<
/div>
)
this
.
setState
({
...
question
[
this
.
state
.
i
+
1
],
i
:
this
.
state
.
i
+
1
,
list
:
list
})
}
// setAnswer(e) {
...
...
@@ -60,7 +58,7 @@ class Quiz extends React.Component {
return
(
<
div
className
=
"
Quiz
"
>
<
h2
>
Q
:{
this
.
state
.
Q
}
<
/h2
>
<
div
>
<
div
>
{
this
.
state
.
list
}
<
/div
>
<
div
className
=
"
App
"
>
정답을
입력하세요
...
...
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