Skip to content

Conversation

@minji9029
Copy link
Collaborator

@minji9029 minji9029 commented Jun 18, 2025

체크리스트 [기본]
중고마켓

  • 중고마켓 페이지 주소는 “/items” 입니다.

  • 페이지 주소가 “/items” 일때 상단네비게이션바의 '중고마켓' 버튼의 색상은 “3692FF”입니다.

  • 상단 네비게이션 바는 이전 미션에서 구현한 랜딩 페이지와 동일한 스타일로 만들어 주세요.

  • 상품 데이터 정보는 https://panda-market-api.vercel.app/docs/#/ 에 명세된 GET 메소드 “/products” 를 사용해주세요.

  • '상품 등록하기' 버튼을 누르면 “/additem” 로 이동합니다. ( 빈 페이지 )

  • 전체 상품에서 드롭 다운으로 “최신 순” 또는 “좋아요 순”을 선택해서 정렬을 할 수 있습니다.

  • 중고마켓 반응형
    베스트 상품
    Desktop : 4개 보이기
    Tablet : 2개 보이기
    Mobile : 1개 보이기
    전체 상품
    Desktop : 12개 보이기
    Tablet : 6개 보이기
    Mobile : 4개 보이기

체크리스트 [심화]

  • 페이지 네이션 기능을 구현합니다.
스크린샷 2025-06-18 오후 5 05 19

멘토에게

css 분리가 필요한데
styled-components로 작성하는 방식이랑
css파일로 따로 분리하는 방식을 같이 사용해도 괜찮을까요?

스타일은 일정한게 좋을 거같긴한데 css가 너무 짧을때는 styled-components가 가독성이 좋아보여서 고민스럽네요

기존에 주신 코드리뷰는 반영하기 전입니다
리팩토링 해보겠습니다!!

@minji9029 minji9029 changed the base branch from main to React-배민지 June 18, 2025 07:46
@minji9029 minji9029 changed the title React 배민지 sprint5 [배민지] sprint5 Jun 18, 2025
@minji9029 minji9029 requested a review from addiescode-sj June 18, 2025 07:46
@minji9029 minji9029 added the 매운맛🔥 뒤는 없습니다. 그냥 필터 없이 말해주세요. 책임은 제가 집니다. label Jun 18, 2025
@minji9029 minji9029 changed the title [배민지] sprint5 [배민지] refactor/sprint5 Jun 18, 2025
Copy link
Collaborator

@addiescode-sj addiescode-sj left a comment

Choose a reason for hiding this comment

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

추가 PR도 수고하셨습니다! 👍

주요 리뷰 포인트

  • 의미가 명확한 props만 남기기
  • 재사용성을 위해 로직을 커스텀 훅으로 분리하기
  • 리턴문 깔끔하게 유지하기

Comment on lines +13 to +24
const MenuItem = styled(Menu.Item)`
display: block;
padding: 10px 16px;
font-size: 16px;
background-color: white;
color: #1f2937;
cursor: pointer;

&:hover {
background-color: #f3f4f6;
}
`;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Headless UI로 기본적인 접근성 및 기능을 붙이고 스타일링만 재정의하시는군요 :) 좋은 접근입니다! :)

Comment on lines +162 to +182
useEffect(() => {
const updateVisibleCount = () => {
const width = window.innerWidth;

if (width >= 1200) {
// 데스크탑
setVisibleCount(10);
} else if (width >= 768) {
// 태블릿
setVisibleCount(6);
} else {
// 모바일
setVisibleCount(4);
}
};

updateVisibleCount(); // 처음 한 번 실행
window.addEventListener("resize", updateVisibleCount);

return () => window.removeEventListener("resize", updateVisibleCount);
}, []);
Copy link
Collaborator

Choose a reason for hiding this comment

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

이런 로직은 반응형 분기가 필요할때마다 재사용되지않을까요? 커스텀 훅으로 분리해봅시다!

Comment on lines +242 to +246
onChange={(e) => {
setPage(1);
if (e.target.value === "recent") handleNewestClick();
if (e.target.value === "favorite") handleFavoriteClick();
}}
Copy link
Collaborator

Choose a reason for hiding this comment

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

항상 리턴문은 깔끔하게 작성할수있도록 습관을 들여볼까요? 인라인 함수로 작성하기보단, object mapper를 활용하거나 내부 함수로 작성하는 편이 좋을것같네요.

@addiescode-sj addiescode-sj merged commit 52fd044 into codeit-bootcamp-frontend:React-배민지 Jun 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

매운맛🔥 뒤는 없습니다. 그냥 필터 없이 말해주세요. 책임은 제가 집니다.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants