Skip to content

[정남영] 스프린트미션6#63

Merged
wseungjin merged 6 commits intocodeit-sprint-fullstack:react-정남영from
dudska12:react-정남영
Jun 10, 2025

Hidden character warning

The head ref may contain hidden characters: "react-\uc815\ub0a8\uc601"
Merged

[정남영] 스프린트미션6#63
wseungjin merged 6 commits intocodeit-sprint-fullstack:react-정남영from
dudska12:react-정남영

Conversation

@dudska12
Copy link
Collaborator

@dudska12 dudska12 commented Jun 8, 2025

요구사항

기본

프론트엔드

  • Github에 스프린트 미션 PR 생성
  • React로 랜딩 페이지 마이그레이션 및 "/" 경로 설정
  • 중고마켓 페이지 "/items" 경로 설정
  • "/items" 경로일 때 내비게이션 "중고마켓" 버튼 색상 변경 (#3692FF)
  • GET 메서드로 판매 중인 상품 조회 (좋아요 순 제외)
  • 디폴트 이미지 처리 (프론트엔드)
  • '상품 등록하기' 버튼 클릭 시 "/registration" 이동 (빈 페이지)
  • 상품 등록 페이지 PC, Tablet, Mobile 디자인 적용 및 "/registration" 경로 설정
  • POST 메서드로 상품 등록 API 연동
  • 등록 성공 시 상품 상세 페이지로 이동 (빈 페이지)

백엔드

codeit-sprint-fullstack/7-sprint-mission-be#3

심화

프론트엔드

  • 모든 입력값 빈 값 시 등록 버튼 비활성화
  • 태그 입력 후 엔터키로 칩 형태 쌓기
  • Custom Hook으로 상품명, 소개, 가격, 태그 유효성 검사 및 UI 반영
    • 상품명: 1자 이상, 10자 이내
    • 상품 소개: 10자 이상, 100자 이내
    • 판매 가격: 숫자, 1자 이상
    • 태그: 5글자 이내

주요 변경사항

프론트엔드

  • React 기반 랜딩, 중고마켓, 상품 등록 페이지 마이그레이션 및 라우팅 설정
  • API 연동 및 UI/UX 구현
  • 심화 요구사항 유효성 검사 기능 부분 작업 진행 중

백엔드

  • Express 서버에 Product 스키마 및 CRUD API 구현
  • 환경 변수 및 CORS 설정
  • MongoDB 연동 및 render.com 배포 완료

스크린샷

멘토에게

  • 6/8일 기준 아직 미완성입니다. 빠르게 작업 마무리하겠습니다.(멘토링때 피드백받은거 아직 수정 X)
  • 코드정리못하고 제출합니다.. 다음 스프린트미션때까지는 최대한 정리해보도록하겠습니다.

@dudska12 dudska12 self-assigned this Jun 8, 2025
@wseungjin wseungjin self-requested a review June 9, 2025 14:02
Copy link
Collaborator

@wseungjin wseungjin left a comment

Choose a reason for hiding this comment

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

이번주도 수고 많으셨습니다~

return data.list || [];
} catch (error) {
console.error("베스트 상품 가져오기 실패:", error);
return [];
Copy link
Collaborator

Choose a reason for hiding this comment

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

이런 방법도 있긴한데
에러를 만약에 노출할 생각이 있으면 그런것도 고민해서 return값을 줘야 합니다.

@@ -0,0 +1,38 @@
const BASE_URL = "https://panda-market-api.vercel.app/products";
Copy link
Collaborator

Choose a reason for hiding this comment

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

이런건 config 파일로 구분해주세요

import "./productItem.css";
import deleteImg from "../../../assets/image/ic_X.png";
const ProductItem = ({ name, descript, height, textareaName }) => {
const [text, setText] = useState("");
Copy link
Collaborator

Choose a reason for hiding this comment

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

text 같은 네이밍은 너무 포괄적인거 같아요

Mobile: { best: 1, sales: 4 },
Tablet: { best: 2, sales: 6 },
PC: { best: 4, sales: 10 },
Sort: { newest: "recent", like: "favorite" },
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

<ProductItem
name={"상품소개"}
descript={"상품 소개를 입력해주세요"}
height={"282px"}
Copy link
Collaborator

Choose a reason for hiding this comment

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

height 가 필요할까요?


const [getBestItem, setGetBestItem] = useState([]);
const [getSalesItem, setGetSalesItem] = useState([]);
const [salesItems, setSalesItems] = useState([]);
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
Collaborator Author

Choose a reason for hiding this comment

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

급하게하느라 피드백받은 내용을 적용하지못하고 그대로 코드를 가져와서 했습니다 ㅠ 다음스프린트미션때까지 최대한 고쳐서 오도록하겠습니다.


const Selling = () => {
const [sort, setSort] = useState("recent");
const [startPage, setStartPage] = useState(1);
Copy link
Collaborator

Choose a reason for hiding this comment

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

startPage가 정말 필요한게 맞나요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

이 코드도 기존에있는 코드를 가져와서 제대로 수정못했습니다 다음 미션때까지 최대한 고쳐서 와보도록하겠습니다.

@wseungjin wseungjin merged commit e9bdf7f into codeit-sprint-fullstack:react-정남영 Jun 10, 2025
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.

2 participants