Merged
Conversation
✅ Deploy Preview for thejulge1 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
cozy-ito
approved these changes
Apr 28, 2025
src/components/Post/PostCard.tsx
Outdated
Comment on lines
+7
to
+15
| const getPayRateText = (hourlyPay?: number, originalPay?: number): string => { | ||
| if (hourlyPay === undefined || originalPay === undefined) { | ||
| return ""; | ||
| } | ||
|
|
||
| const rawRate = ((hourlyPay - originalPay) / originalPay) * 100; | ||
| const displayRate = Math.min(Math.round(rawRate), 100); | ||
| return `기존 시급보다 ${displayRate}%`; | ||
| }; |
Collaborator
There was a problem hiding this comment.
Post 컴포넌트에도 거의 유사항 로직이 있었는데, 해당 로직을 util 함수로 분리해서 재사용하면 어떨까요? 🤔
src/components/Post/PostCard.tsx
Outdated
Comment on lines
+3
to
+5
| import IconLocation from "@/assets/icon/location.svg?react"; | ||
| import IconTime from "@/assets/icon/time.svg?react"; | ||
| import IconArrow from "@/assets/icon/arrow-up.svg?react"; |
Collaborator
There was a problem hiding this comment.
Suggested change
| import IconLocation from "@/assets/icon/location.svg?react"; | |
| import IconTime from "@/assets/icon/time.svg?react"; | |
| import IconArrow from "@/assets/icon/arrow-up.svg?react"; | |
| import { Location, Time, ArrowUp } from "@/assets/icon"; |
수빈님께서 일괄 export를 해주셔서 위 처럼 아이콘을 사용할 수 있어요! 👍
src/components/Post/PostCard.tsx
Outdated
| {description} | ||
| </p> | ||
| </div> | ||
| {children && <div className="flex gap-2 mt-3">{children}</div>} |
Collaborator
There was a problem hiding this comment.
children prop에는 어떤 내용이 들어가면 되는건지 잘 모르겠어요 하핳 😅
코드를 천천히 살펴보니 버튼 요소가 들어가야 할 것 같긴 하네요! 🤔
PostCard 컴포넌트가 자식 요소로 가져갈 수 있는 것은 많은데,
이미 많은 부분을 위의 코드로 구체화하고 계셔서 어떤 요소가 children으로 전달되어야 할 지 직관적이지 않은 것 같아요 🥲
Collaborator
Author
There was a problem hiding this comment.
코드 꼼꼼하게 리뷰해주셔서 감사합니다!😊 말씀해주신 부분들 참고하여 코드를 개선해보도록 하겠습니다!!
almighty55555
approved these changes
Apr 29, 2025
Collaborator
almighty55555
left a comment
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.
#️⃣연관된 이슈
📝 PR 유형
📝작업 내용
PostCard공통 컴포넌트 구현PostCard컴포넌트 페이지 작성스크린샷 (선택)
💬리뷰 요구사항(선택)