Commit e67f66d7 authored by Jiwon Yoon's avatar Jiwon Yoon
Browse files

a

parent 0cb9f458
import React, { useState } from 'react'; import React, { useState } from 'react';
import AdminQuiz from './AdminQuiz'; import AdminQuiz from './AdminQuiz'
import AdminSetting from './AdminSetting' import AdminSetting from './AdminSetting'
// import { Link } from 'react-router-dom';
let QuizBtn=[]
let QuizBtn = []
function Admin() { function Admin() {
const[result, setresult] = useState('')
const[QuizBtnCount, setQuizBtnCount] = useState(4)
const [result, setresult] = useState('') function handleClickSetting(){
// const [addQuiz, setaddQuiz] = useState('') setresult(<AdminSetting/>)
const [QuizBtnCount, setQuizBtnCount] = useState(4)
function handleClickSetting() {
setresult(<AdminSetting />)
} }
function handleClickQuiz() { function handleClickQuiz(){
setresult(<AdminQuiz />) setresult(<AdminQuiz/>)
} }
function handleClickAddQuiz() { function handleClickAddQuiz(){
QuizBtn.push( QuizBtnCount.push(
<button type="button" className="btn btn-outline-primary" id={QuizBtnCount} onClick={handleClickQuiz}>Quiz {QuizBtnCount}</button> <button type='button' className='btn btn-outline-primary' id={QuizBtnCount} onClick={handleClickQuiz}>Quiz {QuizBtnCount}</button>
) )
setQuizBtnCount(QuizBtnCount + 1) setQuizBtnCount(QuizBtnCount+1)
} }
return ( return (
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment