[김도균] Sprint12#329
Merged
Lanace merged 1 commit intocodeit-bootcamp-frontend:Next-김도균from Mar 2, 2025
Hidden character warning
The head ref may contain hidden characters: "Next-\uae40\ub3c4\uade0-sprint12"
Merged
Conversation
Lanace
approved these changes
Mar 2, 2025
| <ItemCard | ||
| key={item.id} | ||
| item={{ ...item, imageUrl: item.images[0] }} | ||
| className='w-[282px] object-cover h-[282px]' |
Collaborator
There was a problem hiding this comment.
약간 고정값들이 너무 많이 나오는것같아요
보통 magic number라고 하는데, 가급적이면 이런건 따로 상수로 뽑아서 만들어두시는게 좋아요ㅎㅎ!
Collaborator
Author
There was a problem hiding this comment.
매직넘버를 줄이는 게 좋다고 생각합니다! 좋은 의견 감사합니다.
Comment on lines
+27
to
+28
| ${index === 2 ? 'hidden md:flex' : ''} | ||
| ${index === 3 ? 'hidden lg:flex' : ''} `} |
|
|
||
| export default function ItemCard({ item, className, display }: ItmeCardProps) { | ||
| return ( | ||
| <div className={`flex flex-col gap-4 ${display}`}> |
Collaborator
There was a problem hiding this comment.
display 만 따로 props로 받는것보단 차라리 className 을 받도록 처리하는건 어떨까요?ㅎ
추후 확장성을 위해서요~!!
Collaborator
Author
There was a problem hiding this comment.
className으로 일괄 처리해주는 방식이 더 깔끔해 보입니다, 참고하겠습니다!
| description: string; | ||
| price: number; | ||
| tags: string[]; | ||
| images: string | null[]; |
Collaborator
There was a problem hiding this comment.
앗앗... 이거 괄호가 없으면 string 또는 null[] 이 타입으로 정의될꺼에요
그래서 (string | null)[] 로 해야할꺼에요ㅎㅎ~
Collaborator
Author
There was a problem hiding this comment.
헉... 깜빡했습니다. 좋은 지적 감사합니다.
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.
요구사항
기본
중고 마켓
상품 상세
상품 등록
심화
주요 변경사항
멘토에게