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
60d232d8
Commit
60d232d8
authored
Aug 12, 2020
by
Jiwon Yoon
Browse files
asd
parent
befbdcdb
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/AdminQuiz.js
View file @
60d232d8
...
...
@@ -6,7 +6,7 @@ let list = []
let
QnAadmins
=
[]
let
QnAadmin
=
{}
let
c
=
{}
let
savechoose
=
{}
function
AdminQuiz
(
props
)
{
...
...
@@ -24,7 +24,7 @@ function AdminQuiz(props) {
setQuestion
(
event
.
target
.
value
)
}
const
handleChangeChoose
=
(
event
)
=>
{
c
[
event
.
target
.
id
]
=
event
.
target
.
value
savechoose
[
event
.
target
.
id
]
=
event
.
target
.
value
// QnAadmin['Choose'] = event.target.value
...
...
@@ -37,8 +37,6 @@ function AdminQuiz(props) {
setAnswer
(
event
.
target
.
value
)
}
function
addSelectOption
()
{
list
.
push
(
<
div
className
=
"
input-group
"
>
...
...
@@ -65,12 +63,10 @@ function AdminQuiz(props) {
alert
(
'
정답이 입력되지 않았습니다.
'
)
}
else
{
// let data = localStorage.getItem('QnA')
// data=data?JSON.parse(data):''
// QnAadmins.push(data)
console
.
log
(
QnAadmin
)
QnAadmin
[
'
Choose
'
]
=
Object
.
values
(
c
)
QnAadmin
[
'
Choose
'
]
=
Object
.
values
(
savechoose
)
QnAadmins
.
push
(
QnAadmin
)
QnAadmin
=
{}
localStorage
.
setItem
(
'
QnA
'
,
JSON
.
stringify
(
QnAadmins
))
console
.
log
(
QnAadmins
)
alert
(
'
입력이 완료되었습니다.
'
)
...
...
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