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
travel
Commits
4415469c
Commit
4415469c
authored
Jul 20, 2022
by
Yoon, Daeki
😅
Browse files
require auth 프로필과 포스팅에 추가
parent
be135196
Changes
2
Show whitespace changes
Inline
Side-by-side
frontend/src/App.tsx
View file @
4415469c
...
...
@@ -2,7 +2,7 @@ import React from "react";
import
{
BrowserRouter
,
Route
,
Routes
}
from
"
react-router-dom
"
;
import
"
tailwindcss/tailwind.css
"
;
import
{
IntoPost
}
from
"
./post/intopost
"
;
import
{
Login
,
Profile
,
Signup
}
from
"
./auth
"
;
import
{
Login
,
Profile
,
RequireAuth
,
Signup
}
from
"
./auth
"
;
import
{
Header
,
Body
}
from
"
./home
"
;
import
{
Board
}
from
"
./board
"
;
import
Posting
from
"
./post/posting
"
;
...
...
@@ -17,10 +17,24 @@ export const App = () => {
<
Route
path
=
"signup"
element
=
{
<
Signup
/>
}
/>
<
Route
path
=
"/"
element
=
{
<
Header
/>
}
>
<
Route
index
element
=
{
<
Body
/>
}
/>
<
Route
path
=
"posting"
element
=
{
<
Posting
/>
}
/>
<
Route
path
=
"posting"
element
=
{
<
RequireAuth
>
<
Posting
/>
</
RequireAuth
>
}
/>
<
Route
path
=
"board"
element
=
{
<
Board
/>
}
/>
<
Route
path
=
"post/:postId"
element
=
{
<
IntoPost
/>
}
/>
<
Route
path
=
"profile"
element
=
{
<
Profile
/>
}
/>
<
Route
path
=
"profile"
element
=
{
<
RequireAuth
>
<
Profile
/>
</
RequireAuth
>
}
/>
</
Route
>
</
Route
>
</
Routes
>
...
...
frontend/src/auth/index.tsx
View file @
4415469c
export
{
default
as
Login
}
from
"
./login
"
;
export
{
default
as
Signup
}
from
"
./signup
"
;
export
{
default
as
Profile
}
from
"
./profile
"
;
export
{
RequireAuth
}
from
"
./RequireAuth
"
;
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