Commit a6e57583 authored by Lee Soobeom's avatar Lee Soobeom
Browse files

App Route

parent 3d10dcba
...@@ -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={
......
export { default as Board } from "./board"; export { default as Board } from "./board";
export { default as Posts } from "./posts";
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