Skip to content

[feat/#92] 검색 페이지에 useDebounce 적용 및 세부 페이지로 이동 시 검색어 초기화 X #93

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
merged 4 commits into from
May 22, 2025

Conversation

1jiwoo27
Copy link
Member

@1jiwoo27 1jiwoo27 commented May 22, 2025

📌 Related Issues

✅ 체크 리스트

  • PR 제목의 형식을 잘 작성했나요? e.g. [Feat/#이슈번호] PR 템플릿 작성
  • 빌드가 성공했나요? (pnpm build)
  • 컨벤션을 지켰나요?
  • 이슈는 등록했나요?
  • 리뷰어와 라벨을 지정했나요?

📄 Tasks

  • useDebounce를 검색 페이지(/products)에만 적용
  • 다른 페이지에서는 엔터 or 검색 아이콘 클릭 시에만 검색 수행
  • 제품 상세 페이지로 이동 시 키워드 초기화 X

⭐ PR Point (To Reviewer)

📷 Screenshot

usedebounce_zuzgAe0z.mp4
  • 용량 줄이느라 워터마크가 들어갔어요 😶‍🌫️

image
image

  • 카드 한 줄일 때랑 에러/카드 아예 없는 상태랑 푸터 위치 비슷하게 맞췄어요!

🔔 ETC

Copy link

✅ 빌드에 성공했습니다! 🎉

Copy link
Collaborator

@hamxxn hamxxn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다!
예를 들어 6개 이상일 시에만 더보기 버튼 보이게 하는 것도 좋을 것 같아요!

Copy link

✅ 빌드에 성공했습니다! 🎉

Copy link
Member

@jeonghoon11 jeonghoon11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다!! 제가 보기엔 깔끔한데요??
검색하고 항목2개 떴을때 layout만 다시 잡으면 벌써 최고네요 고생하셨습니다!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

깔끔한데요???

@1jiwoo27
Copy link
Member Author

다음 작업들은 #96 로 이어서 진행할 예정입니다!

Copy link
Collaborator

@heesunee heesunee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

경로만 상수로 바꿔주면 될거 같아요! 검색의 권위자 짱짱겅 지우 최고 🥰🥰❤️


const Header = () => {
const navigate = useNavigate();
const location = useLocation();
const isSearchPage = location.pathname === '/products';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이거 경로 route 에 있는 상수로 바꿉시다!

@@ -25,7 +30,16 @@ const Header = () => {
}, []);

useEffect(() => {
if (location.pathname !== '/products') {
if (isSearchPage) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기도 마찬가지!

Copy link

✅ 빌드에 성공했습니다! 🎉

@1jiwoo27 1jiwoo27 merged commit 24bf4cb into develop May 22, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feat] 검색 페이지에만 useDebounce 적용
4 participants