Skip to content

fix: 온라인 이벤트 티켓 구입시 QR코드 안내 처리 #228

Merged
Yejiin21 merged 2 commits intodevelopfrom
fix/#227/online-event-qrcode
Jul 7, 2025
Merged

fix: 온라인 이벤트 티켓 구입시 QR코드 안내 처리 #228
Yejiin21 merged 2 commits intodevelopfrom
fix/#227/online-event-qrcode

Conversation

@Yejiin21
Copy link
Copy Markdown
Contributor

@Yejiin21 Yejiin21 commented Jul 7, 2025

Summary by CodeRabbit

  • 신규 기능

    • 오프라인/온라인 이벤트 유형에 따라 QR 코드 표시 방식이 개선되었습니다. 온라인 이벤트는 QR 코드가 발급되지 않음을 안내합니다.
  • 버그 수정

    • 여러 화면에서 오류 발생 시 콘솔에 에러가 노출되지 않고, 사용자에게만 알림이 표시되도록 개선되었습니다.
  • 스타일

    • 코드 및 화면 요소의 들여쓰기, 따옴표 스타일, 줄바꿈 등 일관성 있게 정리되었습니다.
  • 리팩터

    • 불필요한 콘솔 로그 및 중복 코드가 제거되어 화면 동작이 더욱 깔끔해졌습니다.

@Yejiin21 Yejiin21 self-assigned this Jul 7, 2025
@Yejiin21 Yejiin21 added the 🛠️ BugFix 오류 해결 과정 기록 label Jul 7, 2025
@Yejiin21 Yejiin21 linked an issue Jul 7, 2025 that may be closed by this pull request
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jul 7, 2025

Walkthrough

이 변경사항은 전체적으로 콘솔 로그 및 디버깅 출력을 제거하고, 일부 에러 처리에서 콘솔 출력을 생략하도록 수정하였습니다. 또한, QrModal 컴포넌트에 eventType prop을 추가하여 온라인/오프라인 이벤트에 따라 QR코드 안내 메시지가 다르게 표시되도록 로직을 확장하였습니다. 코드 스타일 및 포맷팅 일관성도 개선되었습니다.

Changes

파일/경로 요약 변경 요약
design-system/ui/modals/QrModal.tsx, src/pages/menu/ui/MyTicketPage.tsx QrModal에 eventType prop 추가 및 사용, 온라인/오프라인 이벤트 구분 렌더링, MyTicketPage에서 eventType 전달
src/features/event/hooks/usePresignedUrlHook.ts, src/features/event/ui/DatePicker.tsx, src/features/event/ui/TimePicker.tsx, src/features/ticket/hooks/useTicketOptionForm.ts, src/features/ticket/hooks/useTicketOptionHook.ts, src/pages/dashboard/ui/EventDetailPage.tsx 모든 콘솔 로그 및 디버그 출력 제거, 코드 스타일 단순화
src/features/event/ui/ShareEventModal.tsx, src/pages/dashboard/ui/EventInfoPage.tsx, src/pages/event/ui/host/HostSelectionPage.tsx, src/pages/join/AuthCallback.tsx, src/pages/join/InfoInputPage.tsx, src/pages/join/LogoutPage.tsx 에러 핸들러에서 콘솔 출력 제거, alert만 남김, 일부 스타일 및 포맷팅 개선
src/shared/ui/EventCard.tsx, src/shared/ui/backgrounds/TicketOptionLayout.tsx 코드 스타일 및 포맷팅 개선, 불필요한 콘솔 로그 제거, 기능 변화 없음
src/shared/types/api/http-client.ts axios 요청 포맷팅 단순화, 기능 변화 없음

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant MyTicketPage
    participant QrModal

    User->>MyTicketPage: 티켓 클릭
    MyTicketPage->>QrModal: eventType prop과 기타 정보 전달
    QrModal->>User: eventType에 따라 QR코드 또는 안내 메시지 표시
Loading

Possibly related issues

Possibly related PRs

Suggested reviewers

  • hyeeuncho

Poem

🐰
로그는 사라지고, 코드는 맑아졌네
온라인엔 안내, 오프라인엔 QR이 반짝
콘솔의 소음은 조용히 사라지고
토끼는 깡총, 코드 리뷰를 하네
이벤트 타입 따라, 화면도 달라졌지!

(오늘도 깔끔한 코드에 당근 한 입!)

Warning

Review ran into problems

🔥 Problems

Check-run timed out after 90 seconds. Some checks/pipelines were still in progress when the timeout was reached. Consider increasing the reviews.tools.github-checks.timeout_ms value in your CodeRabbit configuration to allow more time for checks to complete.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown
Member

@hyeeuncho hyeeuncho left a comment

Choose a reason for hiding this comment

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

잘하셨어요!

@hyeeuncho hyeeuncho self-requested a review July 7, 2025 03:03
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jul 7, 2025

Copy link
Copy Markdown
Member

@hyeeuncho hyeeuncho left a comment

Choose a reason for hiding this comment

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

잘했어요

@Yejiin21 Yejiin21 merged commit 8f5f93b into develop Jul 7, 2025
1 of 2 checks passed
@Yejiin21 Yejiin21 deleted the fix/#227/online-event-qrcode branch July 7, 2025 03:03
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (3)
src/pages/join/InfoInputPage.tsx (1)

70-72: 에러 핸들링 개선 고려사항

에러 파라미터와 콘솔 로깅을 제거한 것은 이해할 수 있지만, 프로덕션 환경에서의 디버깅이 어려워질 수 있습니다. 에러 정보를 완전히 제거하는 대신 로깅 레벨을 조정하거나 에러 모니터링 서비스로 전송하는 것을 고려해보세요.

-      onError: () => {
+      onError: (error) => {
+        console.error('User update failed:', error);
         alert('정보 업데이트에 실패했습니다. 다시 시도해주세요.');
       },
src/pages/dashboard/ui/EventInfoPage.tsx (1)

69-71: 에러 핸들링 개선 고려사항

에러 파라미터를 제거한 것은 코드를 간결하게 만들지만, 디버깅 시 유용한 정보를 잃을 수 있습니다. 프로덕션 환경에서의 문제 해결을 위해 에러 로깅을 유지하는 것을 고려해보세요.

-      onError: () => {
+      onError: (error) => {
+        console.error('Event update failed:', error);
         alert('저장에 실패했습니다.');
       },
design-system/ui/modals/QrModal.tsx (1)

88-119: React children prop 사용 방식을 개선할 수 있습니다.

정적 분석 도구에서 지적한 대로 children prop 대신 JSX 요소를 직접 사용하는 것이 React의 표준 방식입니다.

다음과 같이 수정하는 것을 권장합니다:

<IconText
  size="xSmall"
  iconPath={<img src={qr_calendar} alt="qr_calendar" className="mr-1" />}
- children={formattedDate}
  className="text-11"
-></IconText>
+>
+  {formattedDate}
+</IconText>

다른 IconText 컴포넌트들도 동일하게 수정하면 됩니다.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2c2ebb0 and 3921af6.

📒 Files selected for processing (17)
  • design-system/ui/modals/QrModal.tsx (4 hunks)
  • src/features/event/hooks/usePresignedUrlHook.ts (1 hunks)
  • src/features/event/ui/DatePicker.tsx (1 hunks)
  • src/features/event/ui/ShareEventModal.tsx (2 hunks)
  • src/features/event/ui/TimePicker.tsx (1 hunks)
  • src/features/ticket/hooks/useTicketOptionForm.ts (0 hunks)
  • src/features/ticket/hooks/useTicketOptionHook.ts (0 hunks)
  • src/pages/dashboard/ui/EventDetailPage.tsx (2 hunks)
  • src/pages/dashboard/ui/EventInfoPage.tsx (2 hunks)
  • src/pages/event/ui/host/HostSelectionPage.tsx (1 hunks)
  • src/pages/join/AuthCallback.tsx (1 hunks)
  • src/pages/join/InfoInputPage.tsx (1 hunks)
  • src/pages/join/LogoutPage.tsx (1 hunks)
  • src/pages/menu/ui/MyTicketPage.tsx (3 hunks)
  • src/shared/types/api/http-client.ts (1 hunks)
  • src/shared/ui/EventCard.tsx (4 hunks)
  • src/shared/ui/backgrounds/TicketOptionLayout.tsx (1 hunks)
💤 Files with no reviewable changes (2)
  • src/features/ticket/hooks/useTicketOptionForm.ts
  • src/features/ticket/hooks/useTicketOptionHook.ts
🧰 Additional context used
🧬 Code Graph Analysis (2)
src/pages/join/AuthCallback.tsx (2)
src/app/provider/authStore.ts (1)
  • useAuthStore (17-36)
src/features/join/hooks/useUserHook.ts (1)
  • useUserInfo (5-11)
design-system/ui/modals/QrModal.tsx (1)
src/features/ticket/api/order.ts (1)
  • ticketQrCode (34-40)
🪛 Biome (1.9.4)
design-system/ui/modals/QrModal.tsx

[error] 94-94: Avoid passing children using a prop

The canonical way to pass children in React is to use JSX elements

(lint/correctness/noChildrenProp)


[error] 100-100: Avoid passing children using a prop

The canonical way to pass children in React is to use JSX elements

(lint/correctness/noChildrenProp)


[error] 106-106: Avoid passing children using a prop

The canonical way to pass children in React is to use JSX elements

(lint/correctness/noChildrenProp)


[error] 116-116: Avoid passing children using a prop

The canonical way to pass children in React is to use JSX elements

(lint/correctness/noChildrenProp)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: storybook
🔇 Additional comments (23)
src/pages/dashboard/ui/EventDetailPage.tsx (2)

25-25: 코드 정리 완료

콘솔 로깅 제거로 인한 코드 정리가 잘 이루어졌습니다.


75-75: 포맷팅 개선 확인

TextEditor 컴포넌트의 onChange prop 포맷팅이 일관성 있게 개선되었습니다.

src/shared/types/api/http-client.ts (1)

72-72: 포맷팅 개선 확인

axios.post 호출의 포맷팅이 간결하게 개선되었습니다. 기능에는 영향이 없습니다.

src/pages/dashboard/ui/EventInfoPage.tsx (1)

95-95: 코드 스타일 일관성 개선

따옴표 스타일을 single quote로 통일한 것은 코드 일관성을 위한 좋은 개선사항입니다.

src/pages/event/ui/host/HostSelectionPage.tsx (2)

41-44: 콘솔 로그 제거 승인

에러 처리에서 콘솔 로그를 제거하고 사용자에게 alert만 표시하는 것은 깔끔한 접근입니다. 사용자 경험 개선에 도움이 됩니다.


63-63: 코드 포맷팅 개선 승인

빈 화살표 함수의 포맷팅이 일관성 있게 개선되었습니다.

src/features/event/ui/TimePicker.tsx (2)

19-20: state 초기화 코드 포맷팅 개선 승인

여러 줄에 걸쳐 있던 state 초기화 코드를 한 줄로 통합하여 가독성이 개선되었습니다.


32-47: 콘솔 로그 제거 승인

useEffect에서 디버깅용 console.log를 제거하여 프로덕션 코드를 깔끔하게 정리했습니다.

src/features/event/ui/ShareEventModal.tsx (2)

66-72: 에러 파라미터 제거 승인

catch 블록에서 사용하지 않는 error 파라미터를 제거하여 코드가 더 깔끔해졌습니다.


88-94: 에러 파라미터 제거 승인

catch 블록에서 사용하지 않는 error 파라미터를 제거하여 코드 일관성이 개선되었습니다.

src/features/event/ui/DatePicker.tsx (1)

29-35: state 초기화 코드 포맷팅 개선 승인

삼항 연산자를 한 줄로 통합하여 코드 가독성이 개선되었습니다. 로직은 동일하게 유지되면서 더 간결해졌습니다.

src/pages/join/LogoutPage.tsx (2)

18-28: 조건문 포맷팅 개선 승인

토큰 만료 확인 조건을 한 줄로 통합하여 코드가 더 간결해졌습니다. 로직은 동일하게 유지되면서 가독성이 개선되었습니다.


10-36: AI 요약과 실제 코드 간 불일치 확인 필요

AI 요약에서 QrModal 컴포넌트에 eventType prop 추가 및 온라인/오프라인 이벤트에 따른 QR코드 안내 메시지 처리 언급이 있었으나, 제공된 코드 파일들에서는 해당 변경사항이 보이지 않습니다. 실제 QR코드 관련 변경사항이 다른 파일에 있는지 확인이 필요합니다.

Likely an incorrect or invalid review comment.

src/pages/join/AuthCallback.tsx (1)

1-36: 포맷팅 개선 및 에러 핸들링 정리가 적절합니다.

따옴표 통일과 콘솔 로그 제거를 통한 코드 정리가 PR 목표와 일치합니다. 기능적 로직은 변경되지 않았으며 인증 플로우가 올바르게 유지되고 있습니다.

src/pages/menu/ui/MyTicketPage.tsx (3)

64-66: JSX 포맷팅 개선이 적절합니다.

조건부 로직의 가독성이 향상되었습니다.


139-142: 이벤트 카드 스타일링 포맷팅이 개선되었습니다.

className과 aspectRatio 속성의 가독성이 향상되었습니다.


165-188: 온라인/오프라인 이벤트 구분 기능이 추가되었습니다.

QrModal에 eventType={selectedTicket.event.onlineType} 속성을 추가하여 온라인 이벤트와 오프라인 이벤트를 구분하도록 구현했습니다. 이는 PR의 주요 목표인 온라인 이벤트 티켓 QR코드 안내 처리와 정확히 일치합니다.

src/shared/ui/EventCard.tsx (3)

49-49: 기본값 설정의 포맷팅이 개선되었습니다.

aspectRatio 속성의 기본값에 trailing comma가 추가되어 일관성이 향상되었습니다.


73-75: JSX 요소들의 포맷팅이 일관되게 개선되었습니다.

여러 JSX 요소들이 가독성을 위해 멀티라인 또는 단일라인으로 적절히 정리되었습니다.

Also applies to: 78-80, 94-94, 100-100


138-147: 에러 핸들링 포맷팅이 개선되었습니다.

조건부 로직의 가독성이 향상되었으며, 콘솔 로그 제거로 코드가 정리되었습니다.

src/shared/ui/backgrounds/TicketOptionLayout.tsx (1)

1-141: 전반적인 포맷팅 개선이 일관되게 적용되었습니다.

따옴표 통일, 들여쓰기 조정, 간격 정리 등 코드 스타일의 일관성이 크게 향상되었습니다. 핵심 기능인 티켓 옵션 검증 및 주문 처리 로직은 그대로 유지되어 안정성이 보장됩니다.

design-system/ui/modals/QrModal.tsx (2)

23-23: 온라인/오프라인 이벤트 구분을 위한 새로운 속성이 추가되었습니다.

eventType: 'ONLINE' | 'OFFLINE' 속성 추가로 이벤트 타입에 따른 차별화된 UI 처리가 가능해졌습니다.


63-78: 온라인 이벤트에 대한 QR코드 안내 로직이 올바르게 구현되었습니다.

온라인 이벤트의 경우 QR코드 발급이 불필요함을 명확히 안내하는 메시지가 표시되며, 오프라인 이벤트의 경우 기존 QR코드 로직이 유지됩니다. 이는 PR의 핵심 목표를 정확히 달성합니다.

Comment on lines +28 to 31
} catch {
alert('이미지 업로드에 실패했습니다.');
throw new Error('Failed to upload image');
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

파일 업로드 에러 처리 개선 필요

파일 업로드 관련 에러는 네트워크 문제, 권한 문제, 파일 크기 제한 등 다양한 원인이 있을 수 있습니다. 에러 정보를 완전히 제거하면 사용자 지원 시 문제 해결이 어려워질 수 있습니다.

-  } catch {
+  } catch (error) {
+    console.error('S3 이미지 업로드 실패:', error);
     alert('이미지 업로드에 실패했습니다.');
     throw new Error('Failed to upload image');
   }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
} catch {
alert('이미지 업로드에 실패했습니다.');
throw new Error('Failed to upload image');
}
} catch (error) {
console.error('S3 이미지 업로드 실패:', error);
alert('이미지 업로드에 실패했습니다.');
throw new Error('Failed to upload image');
}
🤖 Prompt for AI Agents
In src/features/event/hooks/usePresignedUrlHook.ts around lines 28 to 31, the
catch block for file upload errors currently does not capture or log the
specific error details, which can hinder troubleshooting. Modify the catch block
to accept the error object, then log or handle the error details appropriately
before alerting the user and throwing a new error. This will preserve useful
error information for debugging and support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🛠️ BugFix 오류 해결 과정 기록

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[fix] 온라인 이벤트 티켓 구입시 QR코드 안내 처리

2 participants