Skip to content

Conversation

@MyungJiwoo
Copy link
Collaborator

판다마켓 7

🌐 배포 url: https://myungjiwoo-pandamarket.netlify.app/items

기본 요구사항

  • Github의 PR을 만들어서 미션을 제출한다.
  • 피그마 디자인에 맞게 페이지를 만든다.
  • React를 활용해서 구현한다.

체크 리스트 (기본)

  • 상품 상세 페이지 주소는 “/items/{productId}” 이다.
  • 상세 정보 : response 로 받은 아래의 데이터로 화면을 구현한다. (favoriteCount, images, tags, name, description)
  • 목록으로 돌아가기 버튼을 클릭하면 중고마켓 페이지 주소인 “/items” 으로 이동한다.
  • 문의하기에 내용을 입력하면 등록 버튼의 색상은 “3692FF”로 변경된다.
  • 문의 : response 로 받은 아래의 데이터로 화면을 구현한다. (image, nickname, content, description, updatedAt)
  • 문의를 수정하려면 기존 문의글이 input으로 바뀐다.
  • 아무 문의가 없을때는 적절한 안내 문구를 띄워준다.

체크 리스트 (심화)

  • 모든 버튼에 자유롭게 Hover 효과를 적용한다.

스크린샷

sprint7-pc

멘토에게

MyungJiwoo added 23 commits May 11, 2025 11:43
@MyungJiwoo MyungJiwoo self-assigned this May 14, 2025
@MyungJiwoo MyungJiwoo added the 매운맛🔥 뒤는 없습니다. 그냥 필터 없이 말해주세요. 책임은 제가 집니다. label May 14, 2025
Copy link
Collaborator

@GANGYIKIM GANGYIKIM left a comment

Choose a reason for hiding this comment

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

지우님 7번째 미션 작업 고생하셨습니다!
리뷰가 진행 중일 때 새로운 커밋이 추가되면 변경 내역이 꼬이거나 리뷰가 누락될 수 있어요.
PR을 올리신 뒤에는 리뷰가 완료되기 전까지는 커밋 추가를 자제해 주시고,
만약 추가로 커밋을 하실 일이 있으시면 저에게 알려주시면 그 후에 리뷰 진행하겠습니다~
다음 미션도 화이팅입니다!

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 +14 to +17
let url = `/products/${productId}/comments?limit=${limit}`;
if (cursor) {
url += `&cursor=${cursor}`;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

💊 제안
getProductComments에서 쿼리 문자열을 직접 조합하기보다는 URLSearchParams을 활용하시면 가독성과 유지보수성이 더 좋을 것 같아요~

https://developer.mozilla.org/ko/docs/Web/API/URLSearchParams

Comment on lines +18 to +20
const [isOpen, setIsOpen] = useState(false);

const handleToggle = () => setIsOpen((prev) => !prev);
Copy link
Collaborator

Choose a reason for hiding this comment

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

💬 여담
reducer 를 사용해 아래처럼 간단하게도 작성 가능합니다~

Suggested change
const [isOpen, setIsOpen] = useState(false);
const handleToggle = () => setIsOpen((prev) => !prev);
const [isOpen, toggleIsOpen] = useReducer((prev) => !prev, false);

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 +21 to +23
return () => {
if (target) observer.unobserve(target);
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

💊 제안
unobserve보다 disconnect() 메서드로 observer 자체를 종료하는 것이 더 적절합니다.

Suggested change
return () => {
if (target) observer.unobserve(target);
};
return () => observer.disconnect();

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 +11 to +17
const DropdownMenu = ({
dropdownItem1,
onDropdownItem1Click,
dropdownItem2,
onDropdownItem2Click,
position = "left",
}) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

💊 제안
지금 컴포넌트 구조상 메뉴가 2개인 경우만 사용이 가능합니다~
공용 컴포넌트인만큼 여러개인 경우도 커버할 수 있게 수정해보시면 더 좋을 것 같아요!

}, [loadComments]);

// 마지막 요소를 감지하는 observer
useObserver(observerRef, loadComments);
Copy link
Collaborator

Choose a reason for hiding this comment

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

💬 여담
무한스크롤을 구현하려고 하시는 것 같아요. intersection observer를 연결하실 때는 마지막 요소보다 2~3개정도 위의 요소에 연결하셔서 사용자가 스크롤하는데 불편함을 느끼지 않게 하시면 더 좋습니다.

Comment on lines +9 to +10
textarea.style.height = "auto";
textarea.style.height = `${textarea.scrollHeight}px`;
Copy link
Collaborator

Choose a reason for hiding this comment

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

❗️ 수정요청

Suggested change
textarea.style.height = "auto";
textarea.style.height = `${textarea.scrollHeight}px`;
textarea.style.height = `${textarea.scrollHeight}px`;

Comment on lines +31 to +32
<StyledButton
onClick={onClick}
Copy link
Collaborator

Choose a reason for hiding this comment

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

❗️ 수정요청

Suggested change
<StyledButton
onClick={onClick}
<StyledButton
type="button"
onClick={onClick}

@GANGYIKIM GANGYIKIM merged commit 512418f into codeit-bootcamp-frontend:React-명지우 May 15, 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.

2 participants