import React, { useState } from 'react'; // import { Link } from 'react-router-dom'; function Admin() { // let QnAadmin = [] // let Q = [] // let choose = [] // let N = [] const [number, setNumber] = useState('') 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 [done, setDone] = useState(false) const handleChangenumber = (event) => { setNumber(event.target.value) } 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 handleClick() { alert('입력이 완료되었습니다') localStorage.setItem('N', number) 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) setDone(true) } return ( <> {done ? alert('모두 입력되었습니다.') : ''}