-
Notifications
You must be signed in to change notification settings - Fork 3
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
[Feat/#372] 예매 조회 페이지 취소 상태 추가 #376
Conversation
PR 작성하느라 고생 많았어요!! 라벨 잘 지정되었는지 확인 한 번 해 주기 🫶 |
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.
고생하셨습니다 ~. ~
const bookingStatusText = { | ||
CHECKING_PAYMENT: "입금 확인 예정", | ||
BOOKING_CONFIRMED: "입금 완료", | ||
BOOKING_CANCELLED: "예매 취소", | ||
}; | ||
type bookingStatusTypes = keyof typeof bookingStatusText; | ||
|
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.
p2) 이 부분은 관리 페이지나 다른 페이지에서도 공통적으로 사용될 수 있을 것 같아서 src/constant 아래에서 전역으로 사용할 수 있게 바꾸면 좋겠어용
아래의 아티클에서 그러면 enum 대신 어떤걸 쓰면 좋나요?
이 부분 읽어보시면 좋을 것 같아요!
https://velog.io/@hhhminme/%EB%84%A4-Enum-%EB%88%84%EA%B0%80-Typescript%EC%97%90%EC%84%9C-Enum%EC%9D%84-%EC%93%B0%EB%83%90
interface DefaultDepositPropTypes { | ||
$status; | ||
} |
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.
p3) 여기서도 타입 import 해서 추가해주세요!
Quality Gate passedIssues Measures |
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.
최고신지 코딩존잘 인정합니띠예~
{item.dueDate < 0 || item.bookingStatus === "BOOKING_CANCELLED" ? ( | ||
<Button variant="line" disabled={true} size={{ width: "10.8rem", height: "3.6rem" }}> | ||
취소하기 | ||
</Button> | ||
) : ( | ||
<Button | ||
variant="line" | ||
size={{ width: "10.8rem", height: "3.6rem" }} | ||
onClick={handleBtn} | ||
> | ||
취소하기 | ||
</Button> | ||
) : ( | ||
<Button variant="line" disabled={true} size={{ width: "10.8rem", height: "3.6rem" }}> | ||
취소하기 | ||
</Button> | ||
)} |
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.
p5) 이 부분 중복 코드가 가독성을 떨어뜨리는 것 같습니다.
<Button
variant="line"
disabled={item.dueDate < 0 || item.bookingStatus === "BOOKING_CANCELLED"}
size={{ width: "10.8rem", height: "3.6rem" }}
onClick={handleBtn}
>
취소하기
</Button>
이렇게 줄여보는건 어떤가용?
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.
좋아용
@sinji2102 신지 추후에 반영해주세용 ~
머지할게요!
📌 관련 이슈번호
🎟️ PR 유형
어떤 변경 사항이 있나요?
✅ Key Changes
📢 To Reviewers
bookingStatusText
관련해서 공통으로 빼는 게 더 좋을 것 같다는 코드리뷰가 있어 반영했습니다!! bookingStatus API 사용하는 페이지 있다면 저기서 사용하면 좋을 것 같아요~📸 스크린샷