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
199db9ee
Commit
199db9ee
authored
Jul 29, 2020
by
김민수
Browse files
No commit message
No commit message
parent
41108b12
Changes
2
Show whitespace changes
Inline
Side-by-side
src/App.js
View file @
199db9ee
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
logo
from
'
./logo.svg
'
;
import
'
./App.css
'
;
import
'
./App.css
'
;
import
Home
from
'
./Home
'
import
Quiz
from
'
./Quiz
'
import
End
from
'
./End
'
import
{
BrowserRouter
as
Router
,
Link
,
Switch
,
Route
}
from
'
react-router-dom
'
;
function
App
()
{
function
App
()
{
return
(
return
(
<
div
className
=
"
App
"
>
<
Router
>
<
h2
>
어떤
페이지가
나올까요
?
^
^<
/h2
>
<
header
>
궁금합니다
^
^
<
Link
to
=
"
/
"
>
<
button
>
Calculus
<
/button
>
<
/Link
>
<
/header
>
<
hr
/>
<
div
>
<
Switch
>
<
Route
exact
path
=
"
/
"
>
<
Home
/>
<
/Route
>
<
Route
path
=
"
/quiz
"
>
<
Quiz
/>
<
/Route
>
<
Route
path
=
"
/end
"
>
<
End
/>
<
/Route
>
<
/Switch
>
<
/div
>
<
/div
>
);
<
/Router
>
)
}
}
export
default
App
;
export
default
App
;
\ No newline at end of file
src/Home.js
View file @
199db9ee
import
React
from
'
react
'
import
React
from
'
react
'
import
{
Link
}
from
'
react-router-dom
'
;
import
{
Link
}
from
'
react-router-dom
'
;
function
Home
()
{
function
Home
()
{
state
=
{
value
:
""
}
return
(
return
(
<
div
className
=
"
Box
"
>
<
div
className
=
"
Box
"
>
<
div
className
=
"
Name
"
>
<
div
className
=
"
Name
"
>
이름을
입력하세요
이름을
입력하세요
<
input
onChange
=
{(
event
)
=>
{
<
input
onChange
=
{(
event
)
=>
{
console
.
log
(
event
.
target
.
value
)
console
.
log
(
event
.
target
.
value
)
this
.
setState
({
}
value
:
event
.
target
.
value
}
/
>
})
}}
/
>
<
/div
>
<
/div
>
{(
this
.
state
.
value
===
null
)
{(
this
.
state
.
value
===
null
)
?
alert
(
'
이름을 입력하세요
'
)
?
alert
(
'
이름을 입력하세요
'
)
:
<
Link
to
=
"
/quiz
"
>
:
<
Link
to
=
"
/quiz
"
>
...
...
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