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
survey
Commits
5d3b9c6f
Commit
5d3b9c6f
authored
Jul 07, 2022
by
Yoon, Daeki
😅
Browse files
Profile, RequireAuth 컴포넌트 라우트에 추가
parent
58fc8be2
Changes
1
Show whitespace changes
Inline
Side-by-side
frontend/src/SurveyRouter.tsx
View file @
5d3b9c6f
...
@@ -2,9 +2,11 @@ import React from "react";
...
@@ -2,9 +2,11 @@ import React from "react";
import
{
BrowserRouter
,
Route
,
Routes
}
from
"
react-router-dom
"
;
import
{
BrowserRouter
,
Route
,
Routes
}
from
"
react-router-dom
"
;
import
App
from
"
./App
"
;
import
App
from
"
./App
"
;
import
{
Login
,
SignUp
}
from
"
./auth
"
;
import
{
Login
,
SignUp
}
from
"
./auth
"
;
import
{
RequireAuth
}
from
"
./auth/RequireAuth
"
;
import
{
SurveyForm
}
from
"
./commons
"
;
import
{
SurveyForm
}
from
"
./commons
"
;
import
{
CreateSurveyForm
}
from
"
./CreateSurveyForm
"
;
import
{
CreateSurveyForm
}
from
"
./CreateSurveyForm
"
;
import
{
Home
}
from
"
./home
"
;
import
{
Home
}
from
"
./home
"
;
import
{
Profile
}
from
"
./profile
"
;
export
const
SurveyRouter
=
()
=>
{
export
const
SurveyRouter
=
()
=>
{
return
(
return
(
...
@@ -16,6 +18,14 @@ export const SurveyRouter = () => {
...
@@ -16,6 +18,14 @@ export const SurveyRouter = () => {
<
Route
path
=
"signup"
element
=
{
<
SignUp
/>
}
/>
<
Route
path
=
"signup"
element
=
{
<
SignUp
/>
}
/>
<
Route
path
=
"create"
element
=
{
<
CreateSurveyForm
/>
}
/>
<
Route
path
=
"create"
element
=
{
<
CreateSurveyForm
/>
}
/>
<
Route
path
=
"survey"
element
=
{
<
SurveyForm
/>
}
/>
<
Route
path
=
"survey"
element
=
{
<
SurveyForm
/>
}
/>
<
Route
path
=
"profile"
element
=
{
<
RequireAuth
>
<
Profile
/>
</
RequireAuth
>
}
/>
</
Route
>
</
Route
>
</
Routes
>
</
Routes
>
</
BrowserRouter
>
</
BrowserRouter
>
...
...
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