Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
students
travel
Commits
a6e57583
Commit
a6e57583
authored
Aug 15, 2022
by
Lee Soobeom
Browse files
App Route
parent
3d10dcba
Changes
2
Hide whitespace changes
Inline
Side-by-side
frontend/src/App.tsx
View file @
a6e57583
...
@@ -4,7 +4,7 @@ import "tailwindcss/tailwind.css";
...
@@ -4,7 +4,7 @@ import "tailwindcss/tailwind.css";
import
{
IntoPost
}
from
"
./post/intopost
"
;
import
{
IntoPost
}
from
"
./post/intopost
"
;
import
{
Login
,
Profile
,
RequireAuth
,
Signup
,
Admin
,
ImgRewrite
}
from
"
./auth
"
;
import
{
Login
,
Profile
,
RequireAuth
,
Signup
,
Admin
,
ImgRewrite
}
from
"
./auth
"
;
import
{
Header
,
Body
}
from
"
./home
"
;
import
{
Header
,
Body
}
from
"
./home
"
;
import
{
Board
}
from
"
./board
"
;
import
{
Board
,
Posts
}
from
"
./board
"
;
import
Posting
from
"
./post/posting
"
;
import
Posting
from
"
./post/posting
"
;
import
{
Layout
}
from
"
./commons
"
;
import
{
Layout
}
from
"
./commons
"
;
import
{
EditPost
}
from
"
./post/editpost
"
;
import
{
EditPost
}
from
"
./post/editpost
"
;
...
@@ -18,7 +18,8 @@ export const App = () => {
...
@@ -18,7 +18,8 @@ export const App = () => {
<
Route
path
=
"login"
element
=
{
<
Login
/>
}
/>
<
Route
path
=
"login"
element
=
{
<
Login
/>
}
/>
<
Route
path
=
"signup"
element
=
{
<
Signup
/>
}
/>
<
Route
path
=
"signup"
element
=
{
<
Signup
/>
}
/>
<
Route
index
element
=
{
<
Body
/>
}
/>
<
Route
index
element
=
{
<
Body
/>
}
/>
<
Route
{
/* <Route
path="posting"
path="posting"
element={
element={
<RequireAuth>
<RequireAuth>
...
@@ -27,8 +28,29 @@ export const App = () => {
...
@@ -27,8 +28,29 @@ export const App = () => {
}
}
/>
/>
<Route path="board" element={<Board />} />
<Route path="board" element={<Board />} />
<
Route
path
=
"post/:postId"
element
=
{
<
IntoPost
/>
}
/>
<Route path="post/:postId" element={<RequireAuth><IntoPost /></RequireAuth>} />
<
Route
path
=
"edit"
element
=
{
<
EditPost
/>
}
/>
<Route path="edit" element={<EditPost />} /> */
}
<
Route
path
=
"posts"
element
=
{
<
Posts
/>
}
>
<
Route
path
=
"posting"
element
=
{
<
RequireAuth
>
<
Posting
/>
</
RequireAuth
>
}
/>
<
Route
path
=
":postId"
element
=
{
<
RequireAuth
>
<
IntoPost
/>
</
RequireAuth
>
}
/>
<
Route
path
=
":postId/edit"
element
=
{
<
EditPost
/>
}
/>
<
Route
index
element
=
{
<
Board
/>
}
/>
</
Route
>
<
Route
<
Route
path
=
"profile"
path
=
"profile"
element
=
{
element
=
{
...
...
frontend/src/board/index.tsx
View file @
a6e57583
export
{
default
as
Board
}
from
"
./board
"
;
export
{
default
as
Board
}
from
"
./board
"
;
export
{
default
as
Posts
}
from
"
./posts
"
;
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