[박수훈] sprint4 리펙토링 및 sprint5#66
Open
mdeeno wants to merge 12 commits intocodeit-sprint-fullstack:react-박수훈from
Hidden character warning
The head ref may contain hidden characters: "react-\ubc15\uc218\ud6c8-sprint5"
Open
[박수훈] sprint4 리펙토링 및 sprint5#66mdeeno wants to merge 12 commits intocodeit-sprint-fullstack:react-박수훈from
mdeeno wants to merge 12 commits intocodeit-sprint-fullstack:react-박수훈from
Conversation
94d6c53 to
f099d6d
Compare
- 상품 등록 유효성 검사 (Custom Hook) 및 태그 칩 기능 구현 - 상품 등록 페이지 반응형 레이아웃(Mobile/Tablet/PC) 적용 - Header 및 RegistrationPage CSS 파일 분리 (스타일 충돌 해결) - App.jsx 상세 페이지 라우팅 오류 수정
reach0908
reviewed
Jan 21, 2026
| @@ -0,0 +1,46 @@ | |||
| import React from 'react'; | |||
Collaborator
There was a problem hiding this comment.
React 17+ 버전에서는 JSX 변환이 자동으로 처리되므로 React import가 필요하지 않습니다.
| // 판다마켓 공식 서버 | ||
| // const BASE_URL = 'https://panda-market-api.vercel.app/products'; | ||
|
|
||
| // 구축한 백엔드 서버(sprint5) |
Collaborator
There was a problem hiding this comment.
API URL이 하드코딩되어 있어 배포 환경에서 문제가 발생합니다.
.env 파일에 VITE_API_URL을 설정하고 import.meta.env.VITE_API_URL을 사용하세요.
|
|
||
| const response = await fetch(`${BASE_URL}?${query}`); | ||
|
|
||
| if (!response.ok) { |
Collaborator
There was a problem hiding this comment.
에러 메시지에 상태 코드를 포함하면 디버깅이 수월합니다.
throw new Error(`데이터 로딩 실패: ${response.status}`);| <nav className={styles.navMenu}> | ||
| <Link to="/" className={styles.navItem}> | ||
| 자유게시판 | ||
| </Link> |
Collaborator
There was a problem hiding this comment.
/items로 가는 Link가 두 번 렌더링되고 있습니다. 이 빈 Link와 아래의 중고마켓 Link가 중복됩니다. 이 빈 Link를 삭제해주세요.
| <div className={styles.imgBox}> | ||
| {/* 이미지가 없을 경우 default 이미지 사용 */} | ||
| <img | ||
| src={product.images[0] || '/img/default_product.png'} |
Collaborator
There was a problem hiding this comment.
Default 이미지 경로가 ProductList.jsx의 /img/img_default.png와 불일치합니다. 상수로 통일하세요.
| e.preventDefault(); // 폼 제출 방지 | ||
| const newTag = tagValue.trim(); | ||
|
|
||
| // 태그 유효성: 빈값 아니고, 중복 아니면 추가 |
Collaborator
There was a problem hiding this comment.
태그 5글자 이내 유효성 검사가 누락되어 있습니다.
if (newTag.length > 5) {
setTagError('태그는 5글자 이내로 입력해주세요.');
return;
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
1. 스프린트 미션 요구사항
기본 요구사항
공통
프론트엔드 구현 요구사항
랜딩 페이지
/로 설정하세요.중고마켓 페이지
/items으로 설정하세요./items일 때 상단내비게이션바의 "중고마켓" 버튼의 색상은#3692FF입니다./registration로 이동합니다. (빈 페이지)상품 등록 페이지
/registration입니다.심화 요구사항
프론트엔드 구현 요구사항
상품 등록 페이지
2. 주요 변경사항
3. 멘토님에게 남길 메시지
심화 요구사항 및 기본 요구사항 중 모르는 부분은 AI를 통해 클론코딩을 하였습니다..
요구사항 중 반응형 디자인을 맞추다 보니 CSS가 자꾸 어긋나는 부분이 생겨서 어색한 부분이 일부 있습니다.
반응형으로 구현하는 부분이 미약해서 작성하는 방법이나 정리 방법 궁금합니다.
그리고 css 파일은 컴포넌트마다 구분하는게 좋은지, 통합하는게 좋은지 기준을 잘 모르겠습니다.