import React, { useState } from 'react'; import Quiz from './Quiz'; // import { Link } from 'react-router-dom'; let list = [] let QuizBtn = [] function Admin() { // let QnAadmin = [] // let Q = [] // let choose = [] // let N = [] const [question, setQuestion] = useState('') const [choose, setChoose] = useState('') const [answer, setAnswer] = useState('') const [password, setPassword] = useState('') const [adminpassword, setAdminPassword] = useState('') const [time, setTime] = useState('') const [addQuiz, setaddQuiz] = useState('') const [selectOption, setselectOption] = useState(1) const [QuizBtnCount, setQuizBtnCount] = useState(4) const handleChangeQuestion = (event) => { setQuestion(event.target.value) } const handleChangeChoose = (event) => { setChoose(event.target.value) } const handleChangeanswer = (event) => { setAnswer(event.target.value) } const handleChangePassword = (event) => { setPassword(event.target.value) } const handleChangeAdminPassword = (event) => { setAdminPassword(event.target.value) } const handleChangeTime = (event) => { setTime(event.target.value) } function handleClickSetting(){ } function handleClick() { alert('입력이 완료되었습니다') localStorage.setItem('Q', question) localStorage.setItem('Choose', choose) localStorage.setItem('Answer', answer) localStorage.setItem('P', password) localStorage.setItem('AP', adminpassword) localStorage.setItem('T', time * 1000) } function addSelectOption() { list.push(
) setselectOption(selectOption + 1) } function handleClickQuiz() { let addQuiz = function () { return Quiz4 } setaddQuiz(addQuiz) } function handleClickAddQuiz() { QuizBtn.push( ) setQuizBtnCount(QuizBtnCount+1) } return ( <>

관리자페이지

{QuizBtn.map((element) => element)}

관리자 설정 변경 창

변경할 비밀번호를 입력하세요

변경할 관리자 비밀번호를 입력하세요

타이머를 설정하세요(초단위)

문제만들기

1.
{list.map((element) => element)}
정답:
) } export default Admin