-
Notifications
You must be signed in to change notification settings - Fork 31
[차경훈] sprint6 #157
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
Merged
dongqui
merged 9 commits into
codeit-bootcamp-frontend:React-차경훈
from
maclovedany:React-차경훈-sprint6
May 20, 2025
The head ref may contain hidden characters: "React-\uCC28\uACBD\uD6C8-sprint6"
Merged
[차경훈] sprint6 #157
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
88f1324
additem 페이지 구현
maclovedany cbd5134
refacto: 기존 작업들 component화 작업 및 일부 에러 수정작업
maclovedany 3710fb0
/items 페이지 일부항목 (검색창) 등 ui 수정
maclovedany 77711fa
fix: /additem 이미지등록 기능 수정
maclovedany 5c6a97d
fix: /additem 상품평, 상품소개, 판매가격, 태그 크기 조정
maclovedany eca63b5
일부 ui 수정
maclovedany 2de217a
refacto: css 를 styled css 로 변경. 기타 ui 오작동 수정
maclovedany 32da9fb
fix: 일부 미완된 styled css 작업 및 불필요 파일 삭제
maclovedany 7792c3a
태그입력 오류 수정, 입력 갯수제한 수정
maclovedany File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| import React from "react"; | ||
| import { BrowserRouter, Routes, Route } from "react-router-dom"; | ||
| import { BrowserRouter, Routes, Route, useLocation } from "react-router-dom"; | ||
| import Header from "./components/Header"; | ||
| import Footer from "./components/Footer"; | ||
| import HomePage from "./pages/HomePage"; | ||
|
|
@@ -11,10 +11,19 @@ import PrivacyPage from "./pages/PrivacyPage"; | |
| import FaqPage from "./pages/FaqPage"; | ||
| import MyProfilePage from "./pages/MyProfilePage"; | ||
|
|
||
| function App() { | ||
| function AppContent() { | ||
| const location = useLocation(); | ||
| const hideFooterRoutes = ["/additem", "/signin", "/signup"]; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| const hideHeaderRoutes = ["/signin", "/signup"]; | ||
|
|
||
| // 현재 라우트에 따라 헤더 표시 여부 결정 | ||
| const shouldShowHeader = !hideHeaderRoutes.includes(location.pathname); | ||
| // 현재 라우트에 따라 푸터 표시 여부 결정 | ||
| const shouldShowFooter = !hideFooterRoutes.includes(location.pathname); | ||
|
|
||
| return ( | ||
| <BrowserRouter> | ||
| <Header /> | ||
| <> | ||
| {shouldShowHeader && <Header />} | ||
| <Routes> | ||
| <Route path="/" element={<HomePage />} /> | ||
| <Route path="/signin" element={<SigninPage />} /> | ||
|
|
@@ -25,7 +34,15 @@ function App() { | |
| <Route path="/faq" element={<FaqPage />} /> | ||
| <Route path="/myprofile" element={<MyProfilePage />} /> | ||
| </Routes> | ||
| <Footer /> | ||
| {shouldShowFooter && <Footer />} | ||
| </> | ||
| ); | ||
| } | ||
|
|
||
| function App() { | ||
| return ( | ||
| <BrowserRouter> | ||
| <AppContent /> | ||
| </BrowserRouter> | ||
| ); | ||
| } | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
무슨 일인지, react-router-dom이 커밋에서 빠져있습니다.. 😿