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
16184ff8
Commit
16184ff8
authored
Aug 17, 2020
by
baesangjune
Browse files
.
parent
fbdf8414
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Admin.js
View file @
16184ff8
...
...
@@ -14,8 +14,11 @@ function Admin() {
}
function
handleClickQuiz
(
e
)
{
(
JSON
.
parse
(
localStorage
.
getItem
(
'
QnA
'
))
===
null
)
?
setresult
(
<
AdminQuiz
QuizNum
=
{
e
.
target
.
id
}
data
=
{{
Q
:
'
x
'
,
Choose
:
'
x
'
,
A
:
'
x
'
}}
/>
)
: setresult
(
<AdminQuiz QuizNum={e.target.id} data={JSON.parse
(
localStorage.getItem
(
'QnA'
))
} /
>
)
}
(
JSON
.
parse
(
localStorage
.
getItem
(
'
QnA
'
))
===
null
)
?
setresult
(
<
AdminQuiz
QuizNum
=
{
e
.
target
.
id
}
data
=
{{
Q
:
'
x
'
,
Choose
:
'
x
'
,
A
:
'
x
'
}}
/>
)
: setresult
(
<AdminQuiz QuizNum={e.target.id} data={JSON.parse
(
localStorage.getItem
(
'QnA'
))
} /
>
)
console
.
log
(
'
data
'
)
console
.
log
(
data
)
console
.
log
(
QuizNum
)
}
function
handleClickAddQuiz
()
{
QuizBtn
.
push
(
...
...
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