-
Notifications
You must be signed in to change notification settings - Fork 0
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
[FE] refactor: 검색 탭 삭제 및 순서 수정 #578
Conversation
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.
Title에 이것저것 추가하면서 Common에서 벗어난 컴포넌트가 됐네요!
얘기한 것처럼 내부 컴포넌트로 옮기는게 좋아보입니다~
검색 탭 context로 저장해줘용~~~
부탁해용~~~~~~🥳
<DropDownIcon variant="arrow" color={theme.colors.black} width={15} height={15} /> | ||
</TitleLink> | ||
<Link as={RouterLink} to="/search" style={{ marginLeft: 'auto' }}> |
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.
저도 Title 컴포넌트는 분리해야 한다고 생각드네요!
그리고 검색 탭을 삭제하고 타이틀을 바꾸는 것은 어떤가요??
SearchPage에서 탭 구분 없이 주소 쿼리로 구분하면 될 것 같다는 생각이네요
수고했어요 타미!
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.
고생했어요 타미!
코멘트 확인해주시고 한번 시도해보세요 😊
frontend/src/pages/SearchPage.tsx
Outdated
const { pathname } = useLocation(); | ||
const [, , currentPath] = pathname.split('/'); |
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.
useParams 훅을 사용해보면 어떨까요?
split과 배열에서 뽑는 과정이 없어지겠네요!
frontend/src/router/index.tsx
Outdated
path: `${PATH.SEARCH}/products`, | ||
element: <SearchPage />, | ||
}, | ||
{ | ||
path: `${PATH.SEARCH}/recipes`, |
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.
만약 값을 가져오지 못한다면 다이나믹 세그먼트를 사용해보아요. 그러면 유효하지 않는 페이지는 타입가드해서 Not Found 페이지로 보내면 되겠네요. 이 부분은 페이지 컴포넌트에서 진행하면 되겠습니다 👍
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.
Title 컴포넌트는 product에서만 쓰니까 productTitle로 컴포넌트명을 수정해도 좋을 거 같네요!
수고했어요 타미~~
Issue
✨ 구현한 기능
검색 아이콘을 누르면 해당 페이지로 이동하고, 뒤로 가기를 누르면 이전 페이지로 돌아갑니다.
📢 논의하고 싶은 내용
🎸 기타
x
⏰ 일정