Skip to content

Conversation

@aha-hyeong
Copy link
Collaborator

요구사항

기본 요구사항

공통

  • Github에 스프린트 미션 PR을 만들어 주세요.
  • React를 사용해 진행합니다.

중고마켓 페이지

  • PC, Tablet, Mobile 디자인에 해당하는 중고마켓 페이지를 만들어 주세요.
  • 중고마켓 페이지 url path는 별도로 설정하지 않고, '/'에 보이도록 합니다.
  • 상단 네비게이션 바, 푸터는 랜딩 페이지와 동일한 스타일과 규칙으로 만들어주세요.
  • 상품 데이터는 https://panda-market-api.vercel.app/docs/에 명세된 GET 메소드 "/products" 를 활용해주세요.
    • 상품 목록 페이지네이션 기능을 구현합니다.
    • 드롭 다운으로 "최신 순" 또는 "좋아요 순"을 선택해서 정렬을 구현하세요.
    • 상품 목록 검색 기능을 구현합니다.
  • 베스트 상품 데이터는 https://panda-market-api.vercel.app/docs/에 명세된 GET 메소드 "/products"의 정렬 기준 favorite을 사용해주세요.

심화 요구사항

공통

  • 커스텀 hook을 만들어 필요한 곳에 활용해 보세요.

중고마켓 페이지

  • 중고 마켓의 카드 컴포넌트 반응형 기준은 다음과 같습니다.
    베스트 상품
    Desktop : 4열
    Tablet : 2열
    Mobile : 1열
    전체 상품
    Desktop : 5열
    Tablet : 3열
    Mobile : 2열

  • 반응형에 따른 페이지 네이션 기능을 구현합니다.

    • 반응형으로 보여지는 물품들의 개수를 다르게 설정할때 서버에 보내는 pageSize값을 적절하게 설정합니다.

주요 변경사항


스크린샷


멘토에게

  • 셀프 코드 리뷰를 통해 질문 이어가겠습니다.

@aha-hyeong aha-hyeong requested a review from rl0425 May 30, 2025 02:34
@aha-hyeong aha-hyeong self-assigned this May 30, 2025
Copy link
Collaborator

@rl0425 rl0425 left a comment

Choose a reason for hiding this comment

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

고생하셨습니다. 리뷰에 관한 내용은 멘토링 시간에 더 자세하게 말씀드리겠습니다.

}

.footer-right img {
vertical-align: middle;
Copy link
Collaborator

Choose a reason for hiding this comment

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

vertical-align은 인라인 요소에만 작동하기 때문에, 바깥 박스에서 align-items: center 를 사용하시는 것을 추천드립니다.

.footer-right {
  display: flex;
  gap: 1.2rem;
  align-items: center;
}

const emailValue = elInputUserEmail.value.trim();

if (emailValue === "") {
elInputUserEmail.style.outline = "2px solid #f74747";
Copy link
Collaborator

Choose a reason for hiding this comment

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

스타일이 하드코딩된 경우가 많은데, 이렇게 되면 현재 코드처럼 중복되는 코드가 많아지고, 이게 어떠한 상태를 나타내는건지 추후에 한눈에 파악하기 어렵습니다. 또한, 성능적으로도 여러개의 스타일을 삽입하실 경우에는 CSS 클래스를 사용하시는 것을 추천드립니다.

// 현재
elInputUserEmail.style.outline = "2px solid #f74747";

->
elInputUserEmail.classList.add('error');
elInputUserEmail.classList.remove('success');

elInputUserPassword.parentElement.style.border = "2px solid #f74747";
elPasswordEmptyError.style.display = "block";
elPasswordError.style.display = "none";
} else if (passwordValue.length < 8) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

현재는 패스워드의 제한이 8이지만, 추후에 언제든지 바뀔 수 있는 매직넘버이기 때문에 변수로 선언후에 사용하시는 것을 추천드립니다.

passwordValue.length < 8

->
const MIN_PASSWORD_LENGTH = 8;
if (passwordValue.length < MIN_PASSWORD_LENGTH)


<form action="/signup" method="post" class="sign-form">
<div class="email">
<label for="user-email" class="user-email">이메일</label>
Copy link
Collaborator

Choose a reason for hiding this comment

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

label의 for 속성 연결이 누락되어있습니다. 아래와 같이 바꾸시면 될 것 같습니다.

<label for="user-nick-name" class="user-nick-name">닉네임</label>
<input id="user-nick-name" class="nick-name-input" type="text" name="user-nick-name" ... />


<div class="footer-right">
<a href="https://www.facebook.com/codeit.kr/?locale=ko_KR" target="_blank">
<img class="facebook" src="./images/home/facebook.svg" alt="페이스북" ></img>
Copy link
Collaborator

Choose a reason for hiding this comment

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

해당 이미지 태그는, 안쪽에 내용이 없으시면 열린태그에서 바로 닫으셔도 무방합니다.

<img class="facebook" src="./images/home/facebook.svg" alt="페이스북" ></img>
<img class="facebook" src="./images/home/facebook.svg" alt="페이스북" />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants