-
Notifications
You must be signed in to change notification settings - Fork 1
✨ feat: 각 페이지 컴포넌트 생성 및 라우팅 설정 #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/App.tsx
Outdated
| <Route path="/profile" element={<Profile />} /> | ||
| <Route path="/profile/edit" element={<ProfileForm />} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <Route path="/profile" element={<Profile />} /> | |
| <Route path="/profile/edit" element={<ProfileForm />} /> | |
| <Route path="/profile"> | |
| <Route index element={<Profile />} /> | |
| <Route path="edit" element={<ProfileForm />} /> | |
| </Route> |
하위 경로가 있는 경우 다음과 같이 표기하는 게 좋지 않을까 싶네요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아하 감사합니다 수정해보겠습니다!
src/App.tsx
Outdated
| <Route path="/" element={<PostList />} /> | ||
| <Route path="/login" element={<Login />} /> | ||
| <Route path="/signup" element={<Signup />} /> | ||
| <Route path="/owner/store" element={<Store />} /> | ||
| <Route path="/owner/store/edit" element={<StoreEdit />} /> | ||
| <Route path="/owner/post" element={<StoreForm />} /> | ||
| <Route path="/owner/post/:id" element={<StorePost />} /> | ||
| <Route path="/profile" element={<Profile />} /> | ||
| <Route path="/profile/edit" element={<ProfileForm />} /> | ||
| <Route path="/post/:id" element={<Post />} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
경로를 작성할 때 가장 앞의 /는 필요없지 않나요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
엇 앞에 / 필요하다고 배우긴 했는데 한번 생략해도 되는지 적용해보겠습니다
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
찾아보니까 상대경로냐, 아님 절대 경로냐에 따라서 /를 붙일지 정해진다고합니다.
Moon-ju-young
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
공고 리스트 경로가 /으로 바뀌었다면 공고 상세 페이지 경로도 /post/:id가 아니라 그냥 `/:id가 좋지 않을까 싶네요?
저희가 나중에 랜딩페이지를 추가하게 된다면 해당 페이지가 |
minimo-9
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수정 잘해주셨네요! 굿입니다
src/App.tsx
Outdated
| <Route path="/" element={<PostList />} /> | ||
| <Route path="/login" element={<Login />} /> | ||
| <Route path="/signup" element={<Signup />} /> | ||
| <Route path="/owner/store" element={<Store />} /> | ||
| <Route path="/owner/store/edit" element={<StoreEdit />} /> | ||
| <Route path="/owner/post" element={<StoreForm />} /> | ||
| <Route path="/owner/post/:id" element={<StorePost />} /> | ||
| <Route path="/profile" element={<Profile />} /> | ||
| <Route path="/profile/edit" element={<ProfileForm />} /> | ||
| <Route path="/post/:id" element={<Post />} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
찾아보니까 상대경로냐, 아님 절대 경로냐에 따라서 /를 붙일지 정해진다고합니다.
📌 변경 사항 개요
📝 상세 내용
각 페이지 컴포넌트 생성
/login| Login/signup| Signup/owner/store| Store/owner/store/edit| StoreEdit/owner/post| StoreForm/owner/post/:id| StorePost/profile| Profile/profile/edit| ProfileForm/| PostList/posts/:id| Post라우팅 설정
🔗 관련 이슈
💡 참고 사항
경로나 컴포넌트명 수정이 필요하시면 팀원분께 말씀해주신 뒤 노션 및 이슈에서 수정 후 사용 부탁드립니다~!