Skip to content

feat: 티켓 옵션 응답 페이지 퍼블리싱#75

Merged
hyeeuncho merged 6 commits intodevelopfrom
feat/#70/ticket-option-response
Mar 20, 2025
Merged

feat: 티켓 옵션 응답 페이지 퍼블리싱#75
hyeeuncho merged 6 commits intodevelopfrom
feat/#70/ticket-option-response

Conversation

@hyeeuncho
Copy link
Copy Markdown
Member

@hyeeuncho hyeeuncho commented Mar 19, 2025

티켓이 1장일 경우 - 바로 결제하기 버튼

Image

티켓이 2장 이상일 경우 - 다음 티켓 옵션 선택

Image

마지막 페이지에서는 결제하기 버튼

Image

@hyeeuncho hyeeuncho added the 🖼️ Publishing 페이지 퍼블리싱 label Mar 19, 2025
@hyeeuncho hyeeuncho self-assigned this Mar 19, 2025
@hyeeuncho hyeeuncho linked an issue Mar 19, 2025 that may be closed by this pull request
2 tasks
@hyeeuncho hyeeuncho requested a review from Yejiin21 March 19, 2025 04:35
@github-actions
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

@Yejiin21 Yejiin21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

퍼블리싱 하느라 수고 많으셨습니다:) 몇 가지 코멘트 남겼어요!

<div className="flex gap-4">
<img src={ticket} alt="ticket logo" className="w-7" />
<div>
<p className="font-bold text-sm md:text-base">콘서트 티켓</p>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

콘서트 티켓 텍스트 크기가 좀 더 커도 좋을 것 같아요!
콘서트 티켓과 티켓에 대한 설명 사이에 너비가 기본적으로 어느정도 있어서 mt-1도 없어도 괜찮을 것 같아요

option.choices.map((choice) => (
<label key={choice} className="block mt-2">
<Checkbox
key={choice}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

태크과 Checkbox 동시에 key={choice}를 사용하셨는데, Checkbox 컴포넌트가 이미 태그 내부에 있으므로 Checkbox 내에 설정한 key값을 삭제하셔도 됩니당

//버튼 텍스트
const isLastPage = currentPage === ticketAmount;
const buttonText = isLastPage ? "결제하기" : "다음 티켓 옵션 선택하기";
const handleNextPage = () => {
Copy link
Copy Markdown
Contributor

@Yejiin21 Yejiin21 Mar 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 함수에서 resetOptions(currentPage)를 호출하면 현재 페이지의 데이터가 모두 리셋하도록 설정하셨는데, 사용자가 페이지를 이동할 때 이전 데이터를 유지하는게 일반적인걸로 알고 있어요!
그래서 혹시 리셋 기능을 구현한 이유가 있을까요??

const currentSelectedOptions = selectedOptions[currentPage] || {};

//text
const handleInputChange = (optionName: string, value: string) => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

handleInputChange, handleRadioChange, handleCheckboxChange 핸들러 함수들에서 setOption(currentPage, optionName, value); 이 기능은 모두 공통적인 역할이네요!
유사한 기능이 있다면, 중복을 줄이고 하나의 handleChange 함수로 통합해서 타입에 따라 동작을 분기하는 방식으로 하면 더 좋을 것 같아요

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TicketOption.tsx는 사용자의 입력을 받아 저장하는 기능이므로 feature에 위치시킨 것 같은데 segments 분류가 이루어지지 않았네용
페이지에 보여져야하는 ui 컴포넌트여서 features/payment/ui/TicketOption.tsx 파일구조로 변경해주시면 좋을 것 같아요

@Yejiin21 Yejiin21 self-requested a review March 19, 2025 09:12
@github-actions
Copy link
Copy Markdown

@hyeeuncho hyeeuncho force-pushed the feat/#70/ticket-option-response branch from f87bf0d to 8a1ac01 Compare March 20, 2025 13:50
@github-actions
Copy link
Copy Markdown

@hyeeuncho hyeeuncho merged commit 7e5d0f4 into develop Mar 20, 2025
1 check passed
@hyeeuncho hyeeuncho deleted the feat/#70/ticket-option-response branch March 20, 2025 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🖼️ Publishing 페이지 퍼블리싱

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feat] 티켓 옵션 응답 퍼블리싱

2 participants