[김상우A] Sprint 4#69
Open
codribble wants to merge 10 commits intocodeit-sprint-fullstack:react-김상우Afrom
Hidden character warning
The head ref may contain hidden characters: "react-\uae40\uc0c1\uc6b0A-sprint4"
Open
Conversation
added 9 commits
March 23, 2026 14:10
iamjaeholee
reviewed
Mar 30, 2026
Collaborator
iamjaeholee
left a comment
There was a problem hiding this comment.
안녕하세요, 상우님! 스프린트 미션4 수고 많으셨어요 🥇
코드 전반적으로 잘 구성되어 있었습니다! 특히 아래 부분들이 인상 깊었어요.
SearchForm,Sorting,Pagination,ProductList,ProductWrap등 역할에 맞게 컴포넌트가 잘 분리되어 있었어요.src/api/products.js로 API 호출 로직을 별도 파일로 분리하신 점도 좋았습니다.usePageSize커스텀 훅을 만들어서 반응형 페이지 사이즈 로직을 재사용 가능하게 분리하신 점이 특히 좋았어요!- 상품이 없을 때
"등록된 상품이 없습니다."빈 상태 처리도 세심하게 잘 되어 있었습니다.
개선이 필요한 부분들은 아래 파일별 코멘트에 남겨두었으니 참고해 주세요 😊
Collaborator
|
베스트 상품은 항상 // 베스트 상품 전용 useEffect (bestLimit 변경 시에만 재호출)
useEffect(() => {
const fetchBest = async () => {
const best = await getProductList(1, bestLimit, "favorite");
setBestProducts(best?.list ?? []);
};
fetchBest();
}, [bestLimit]);
// 전체 상품 전용 useEffect
useEffect(() => {
const fetchProducts = async () => {
const data = await getProductList(page, totalLimit, sorting, keyword);
setProducts(data?.list ?? []);
setTotalCount(data?.totalCount ?? 0);
};
fetchProducts();
}, [page, sorting, keyword, totalLimit]);그리고 |
9c4ace7 to
5b63d55
Compare
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.
기본 요구사항
공통
중고마켓 페이지
심화 요구사항
공통
중고마켓 페이지
베스트 상품
Desktop : 4열
Tablet : 2열
Mobile : 1열
전체 상품
Desktop : 5열
Tablet : 3열
Mobile : 2열
반응형에 따른 페이지 네이션 기능을 구현합니다.
반응형으로 보여지는 물품들의 개수를 다르게 설정할때 서버에 보내는 pageSize값을 적절하게 설정합니다.
커밋 컨벤션이 익숙하지가 않아서... 커밋 메세지가 중구난방이라 죄송합니다ㅠ