Skip to content

Conversation

@leeetaesik
Copy link
Collaborator

요구사항

기본

중고마켓

  • 중고마켓 페이지 주소는 “/items” 입니다.
  • 페이지 주소가 “/items” 일때 상단네비게이션바의 '중고마켓' 버튼의 색상은 “3692FF”입니다.
  • 상단 네비게이션 바는 이전 미션에서 구현한 랜딩 페이지와 동일한 스타일로 만들어 주세요.
  • 상품 데이터 정보는 https://panda-market-api.vercel.app/docs/#/ 에 명세된 GET 메소드 “/products” 를 사용해주세요.
  • '상품 등록하기' 버튼을 누르면 “/additem” 로 이동합니다. ( 빈 페이지 )
  • 전체 상품에서 드롭 다운으로 “최신 순” 또는 “좋아요 순”을 선택해서 정렬을 할 수 있습니다.

중고마켓 반응형

  • 베스트 상품
  • 전체 상품

심화

  • 페이지 네이션 기능을 구현합니다.

주요 변경사항

스크린샷

https://leetaesik-sprint.netlify.app/items
image

멘토에게

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

axios, react-router, tailwindcss, @tailwindcss/vite, prettier-plugin-tailwindcss
/layout에 Header.jsx와 그 안에 들어갈 컴포넌트들인 Logo, Navbar, UserMenu파일을 추가했습니다.
baseURL을 갖는 instance생성
기본 단위를 수정해서 px값을 그대로 사용하면 rem으로 변환되게 했습니다.
@leeetaesik leeetaesik requested a review from GANGYIKIM May 11, 2025 10:53
@leeetaesik leeetaesik added the 매운맛🔥 뒤는 없습니다. 그냥 필터 없이 말해주세요. 책임은 제가 집니다. label May 11, 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.

태식님 5번째 미션 작업 고생하셨습니다~
화면 사이즈에 따라 불러오는 아이템 개수를 조절하시는 로직을 잘 구현하셨어요 👍
다음 미션도 화이팅입니다~

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 +10 to +13
<Route element={<Layout />}>
<Route index element={<HomePage />} />
<Route path="items" element={<ItemsPage />} />
</Route>
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍 칭찬
Layout 컴포넌트를 만드신 것 좋아요! 다만 저희 index 페이지의 경우 item 페이지와 디자인이 다른 것으로 압니다!
한번 확인해보세요!

@@ -0,0 +1,14 @@
import ItemCard from "./ItemCard";

const AllItemList = ({ allItemList }) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

💊 제안
AllItemList 와 allItemList는 완전하게 같은 정보를 가지고 있네요! 중복되는 정보의 경우 불필요하니 다른 이름을 추천드려요~

const AllItemSection = ({ items }) => {
const AllItemList= ({ data }) => {

Comment on lines +1 to +4
const Button = ({ children, className, onClick }) => {
return (
<button
className={`bg-primary-100 hover:bg-primary-200 active:bg-primary-300 text-secondary-100 cursor-pointer rounded-[8px] px-23 py-8 text-lg font-semibold ${className}`}
Copy link
Collaborator

Choose a reason for hiding this comment

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

💊 제안
button 을 공통으로 빼신 것 좋아요. 다만 className을 빈 문자열로 초기화하셔야 빈 값일 때 classname에 undefined가 들어가지 않습니다~
추가로 type도 button의 중요속성이니 받게 해주시는 것이 사용성 측면에서 좋습니다!

Suggested change
const Button = ({ children, className, onClick }) => {
return (
<button
className={`bg-primary-100 hover:bg-primary-200 active:bg-primary-300 text-secondary-100 cursor-pointer rounded-[8px] px-23 py-8 text-lg font-semibold ${className}`}
const Button = ({ children, type='button', className = '', onClick }) => {
return (
<button
type={type}
className={`bg-primary-100 hover:bg-primary-200 active:bg-primary-300 text-secondary-100 cursor-pointer rounded-[8px] px-23 py-8 text-lg font-semibold ${className}`}

<NavLink to="/">자유게시판</NavLink>
</li>
<li>
<NavLink
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍 칭찬
NavLink 쓰신 거 좋아요!

Copy link
Collaborator

Choose a reason for hiding this comment

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

💊 제안
드롭다운 외의 영역을 눌렀을때도 닫히게 해주시면 더 사용성이 좋아질 것 같아요.

import { useState } from "react";

const Sort = ({ className, setOrderBy }) => {
const [isOpen, setIsOpen] = useState(false);
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 [isOpen, toggleIsOpen] = useReducer((prev) => !prev, false);

Comment on lines +36 to +41
<Button
className="tablet:order-3"
onClick={() => navigate("/additem")}
>
상품 등록하기
</Button>
Copy link
Collaborator

Choose a reason for hiding this comment

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

💊 제안
지금 코드만으로 보면 버튼 태그보다 Link 태그를 쓰는게 더 적절해보여요.
단순 페이지 이동이 아니라 특정 로직을 실행해야 할때 지금처럼 버튼 태그를 사용하시면 좋을 것 같습니다.
링크 태그를 사용하시면 마우스 오른쪽 클릭이나 새탭 기능도 제공이 가능해서 UX 측면에서도 좋습니다.

Comment on lines +43 to +45
className={
"tablet:order-2 tablet:max-w-325 tablet:min-w-250 tablet:basis-1/3 basis-[calc(100%-56px)]"
}
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
className={
"tablet:order-2 tablet:max-w-325 tablet:min-w-250 tablet:basis-1/3 basis-[calc(100%-56px)]"
}
className="tablet:order-2 tablet:max-w-325 tablet:min-w-250 tablet:basis-1/3 basis-[calc(100%-56px)]"

className="tablet:block font-regular text-secondary-800 border-secondary-200 order-4 hidden w-130 cursor-pointer rounded-[12px] border-1 bg-white bg-[url(./assets/icons/icon-arrow-down.png)] bg-size-[24px_24px] bg-position-[right_20px_center] bg-no-repeat px-20 py-8 text-left text-lg"
onClick={() => setIsOpen(true)}
>
최신순
Copy link
Collaborator

Choose a reason for hiding this comment

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

❗️ 수정요청
조건을 바꿨을 때 적절한 문자열이 나오게 해주세요!

@GANGYIKIM GANGYIKIM merged commit 59f0880 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