-
Notifications
You must be signed in to change notification settings - Fork 39
[박광민] Sprint7 #217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
GANGYIKIM
merged 14 commits into
codeit-bootcamp-frontend:React-박광민
from
minimo-9:React-박광민-sprint7
May 16, 2025
The head ref may contain hidden characters: "React-\uBC15\uAD11\uBBFC-sprint7"
Merged
[박광민] Sprint7 #217
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
37b4358
feat: back-icon.svg 파일 추가
minimo-9 1aac771
feat: panda-empty.svg 파일 추가
minimo-9 932580e
feat: 상품 상세 페이지 라우트 추가
minimo-9 8e17bd2
feat: 상품 댓글 가져오기 API 함수 추가
minimo-9 f4ba603
feat: 상품 상세 정보 가져오기 API 함수 추가
minimo-9 503a063
feat: back-icon 이미지 파일 추가
minimo-9 7980300
feat: kebab-icon 이미지 파일 추가
minimo-9 5347938
feat: ProductCard에 id prop 추가
minimo-9 66e77c3
feat: ProductCard에 id prop 추가
minimo-9 7df80f4
feat: ProductCard에 Link 추가하여 상세 페이지로 이동 가능하도록 수정
minimo-9 7eda977
feat: .cardLink 스타일 추가하여 링크 텍스트 장식 제거
minimo-9 0506080
feat: ProductDetail 컴포넌트 추가 및 상품 상세 정보와 댓글 기능 구현
minimo-9 36d5479
feat: ProductDetail 스타일 추가 및 반응형 디자인 구현
minimo-9 e82073e
feat: ProductDetail 스타일 수정 및 반응형 디자인 개선
minimo-9 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| const getProductComments = async (productId, limit = 10, cursor = null) => { | ||
| try { | ||
| const params = new URLSearchParams(); | ||
| params.append("limit", limit); | ||
| if (cursor !== null) { | ||
| params.append("cursor", cursor); | ||
| } | ||
|
|
||
| const res = await fetch( | ||
| `https://panda-market-api.vercel.app/products/${productId}/comments?${params.toString()}` | ||
| ); | ||
|
|
||
| if (!res.ok) { | ||
| throw new Error("댓글 정보를 불러오지 못했습니다."); | ||
| } | ||
|
|
||
| return await res.json(); | ||
| } catch (error) { | ||
| console.error(error); | ||
| throw error; | ||
| } | ||
| }; | ||
|
|
||
| export default getProductComments; | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| const getProductDetail = async (productId) => { | ||
| try { | ||
| const res = await fetch( | ||
| `https://panda-market-api.vercel.app/products/${productId}` | ||
| ); | ||
|
|
||
| if (!res.ok) { | ||
| throw new Error("상품 상세 정보를 불러오지 못했습니다."); | ||
| } | ||
|
|
||
| return await res.json(); | ||
| } catch (error) { | ||
| console.error(error); | ||
| throw error; | ||
| } | ||
| }; | ||
|
|
||
| export default getProductDetail; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,7 @@ | ||
| .cardLink { | ||
| text-decoration: none; | ||
| } | ||
|
|
||
| .card { | ||
| display: flex; | ||
| flex-direction: column; | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💊 제안
URLSearchParams 함수를 사용하신 것 좋아요! 아래처럼 초기값으로 limit를 넘겨주셔도 됩니다.