Commit 72b2be6f authored by Jiwon Yoon's avatar Jiwon Yoon
Browse files

g

parent 4fadc617
......@@ -3651,6 +3651,8 @@
},
"@testing-library/jest-dom": {
"version": "4.2.4",
"resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-4.2.4.tgz",
"integrity": "sha512-j31Bn0rQo12fhCWOUWy9fl7wtqkp7In/YP2p5ZFyRuiiB9Qs3g+hS4gAmDWONbAHcRmVooNJ5eOHQDCOmUFXHg==",
"requires": {
"@babel/runtime": "^7.5.1",
"chalk": "^2.4.1",
......@@ -3675,6 +3677,8 @@
},
"@testing-library/react": {
"version": "9.5.0",
"resolved": "https://registry.npmjs.org/@testing-library/react/-/react-9.5.0.tgz",
"integrity": "sha512-di1b+D0p+rfeboHO5W7gTVeZDIK5+maEgstrZbWZSSvxDyfDRkkyBE1AJR5Psd6doNldluXlCWqXriUfqu/9Qg==",
"requires": {
"@babel/runtime": "^7.8.4",
"@testing-library/dom": "^6.15.0",
......@@ -3682,7 +3686,9 @@
}
},
"@testing-library/user-event": {
"version": "7.2.1"
"version": "7.2.1",
"resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-7.2.1.tgz",
"integrity": "sha512-oZ0Ib5I4Z2pUEcoo95cT1cr6slco9WY7yiPpG+RGNkj8YcYgJnM7pXmYmorNOReh8MIGcKSqXyeGjxnr8YiZbA=="
},
"@types/babel__core": {
"version": "7.1.9",
......@@ -9482,6 +9488,11 @@
"supports-color": "^6.1.0"
}
},
"jquery": {
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz",
"integrity": "sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg=="
},
"js-tokens": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
......@@ -11121,6 +11132,11 @@
"ts-pnp": "^1.1.6"
}
},
"popper.js": {
"version": "1.16.1",
"resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz",
"integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ=="
},
"portfinder": {
"version": "1.0.27",
"resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.27.tgz",
......@@ -12303,6 +12319,8 @@
},
"react": {
"version": "16.13.1",
"resolved": "https://registry.npmjs.org/react/-/react-16.13.1.tgz",
"integrity": "sha512-YMZQQq32xHLX0bz5Mnibv1/LHb3Sqzngu7xstSM+vrkE5Kzr9xE0yMByK5kMoTK30YVJE61WfbxIFFvfeDKT1w==",
"requires": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1",
......@@ -12514,6 +12532,8 @@
},
"react-dom": {
"version": "16.13.1",
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.13.1.tgz",
"integrity": "sha512-81PIMmVLnCNLO/fFOQxdQkvEq/+Hfpv24XNJfpyZhTRfO0QcmQIF/PgCa1zCOj2w1hrn12MFLyaJ/G0+Mxtfag==",
"requires": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1",
......@@ -12550,6 +12570,8 @@
},
"react-router-dom": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-5.2.0.tgz",
"integrity": "sha512-gxAmfylo2QUjcwxI63RhQ5G85Qqt4voZpUXSEqCwykV0baaOTQDR1f0PmY8AELqIyVc0NEZUj0Gov5lNGcXgsA==",
"requires": {
"@babel/runtime": "^7.1.2",
"history": "^4.9.0",
......@@ -12572,6 +12594,8 @@
},
"react-scripts": {
"version": "3.4.1",
"resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-3.4.1.tgz",
"integrity": "sha512-JpTdi/0Sfd31mZA6Ukx+lq5j1JoKItX7qqEK4OiACjVQletM1P38g49d9/D0yTxp9FrSF+xpJFStkGgKEIRjlQ==",
"requires": {
"@babel/core": "7.9.0",
"@svgr/webpack": "4.3.3",
......
import React, { createContext } from 'react'
import React from 'react'
import './End.css'
import tr from './img/img_end.jpg';
......
.container {
.container-fluid {
background-image: url("./img/img_study.jpg");
background-color: white;
background-size: 100%;
width: 100%;
height: 880px;
height: 600px;
background-repeat: no-repeat;
}
......
import React from 'react'
import { Link } from 'react-router-dom';
import './Home.css';
import React, { useState } from 'react'
import { Redirect } from 'react-router-dom';
import './Home.css'
function Home() {
const [name, setName] = useState('')
const [done, setDone] = useState(false)
const handleChange = (event) => {
setName(event.target.value)
}
function checking(event) {
if (!name) {
alert('이름을 입력하세요')
}
else {
alert('입력하신 이름은' + name + '입니다.')
localStorage.setItem('name', name)
setDone(true)
}
}
function Home() {
return (
<div className="container">
<div >
<div className="text-center">이름을 입력하세요</div>
<div>
<>
{done ? <Redirect to='/quiz' /> : ''}
<div className="container-fluid">
<div className="text-center">
<div>
<input className="inputBox" onChange={(event) => sessionStorage.setItem('name', event.target.value)} />
이름을 입력하세요
</div>
<div>
<Link to="/quiz">
<button className="btn btn-dark" onClick={checking}>Quiz Start !</button>
</Link>
<input className="inputBox" onChange={handleChange} />
<div className='Box2'>
<button className="btn btn-dark" onClick={checking}>Quiz Start !</button>
</div>
</div>
{/* localStorage를 사용해야는지 localstorage를 사용해야하는지 */}
</div>
<div>
계산수학
</div>
</div>
)
}
function checking() {
<div>계산수학</div>
if (localStorage.getItem('name') === null || localStorage.getItem('name').length === 0) {
alert('이름을 입력하세요')
}
else {
alert('입력하신 이름은' + localStorage.getItem('name') + '입니다.')
}
}
</>
)
}
export default Home;
......@@ -4,6 +4,7 @@ import Timer from 'react-compound-timer'; // 타이머쓰기위해 import
import logo from './img/img_question.png'
import fight from './img/img_quiz.png'
const QnA = [
{ Q: "6 X 4 = ?", Choose: [6, 12, 18, 24], A: "4", N: 1 },
{ Q: "3 + 3 = ?", Choose: [2, 4, 6, 8], A: "3", N: 2 },
......
......@@ -2,7 +2,7 @@ import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import 'bootstrap'
import 'bootstrap/dist/css/bootstrap.css';
import * as serviceWorker from './serviceWorker';
ReactDOM.render(
......
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