Skip to content

fix: 구매/참여자 카드 api 호출 hook 함수 오타 수정#183

Merged
xaexunxang merged 1 commit intodevelopfrom
fix/#182/participant-card
Jun 20, 2025
Merged

fix: 구매/참여자 카드 api 호출 hook 함수 오타 수정#183
xaexunxang merged 1 commit intodevelopfrom
fix/#182/participant-card

Conversation

@xaexunxang
Copy link
Copy Markdown
Contributor

@xaexunxang xaexunxang commented Jun 17, 2025

  • 구매/참여자 관리 페이지 내부 인증된 참여자 api 호출 hook 함수 오타 수정

Summary by CodeRabbit

  • 버그 수정
    • 참가자 승인 시 잘못된 식별자가 사용되던 문제를 해결하여, 이제 올바른 참가자 ID로 승인 처리가 이루어집니다.

@xaexunxang xaexunxang requested a review from Yejiin21 June 17, 2025 14:30
@xaexunxang xaexunxang self-assigned this Jun 17, 2025
@xaexunxang xaexunxang added the 🛠️ BugFix 오류 해결 과정 기록 label Jun 17, 2025
@xaexunxang xaexunxang linked an issue Jun 17, 2025 that may be closed by this pull request
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jun 17, 2025

Walkthrough

이 변경은 ParticipantCard.tsx에서 참가자 승인에 사용되는 식별자를 participant.orderId에서 participant.id로 수정하였습니다. 이제 승인 관련 훅과 뮤테이션에 참가자 ID가 전달됩니다. 다른 로직이나 흐름은 변경되지 않았습니다.

Changes

파일/경로 변경 요약
src/features/dashboard/ui/ParticipantCard.tsx 참가자 승인 시 사용되는 식별자를 orderId에서 id로 변경

Possibly related issues

Poem

🐰
참가자 승인, ID로 바꿨어요
orderId는 이제 안녕,
깔끔한 코드, 흐름은 그대로
작은 변화, 큰 정확성
토끼도 박수 짝짝짝!
🥕


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between b67d08f and 5a9d532.

📒 Files selected for processing (1)
  • src/features/dashboard/ui/ParticipantCard.tsx (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
src/features/dashboard/ui/ParticipantCard.tsx (1)
src/features/dashboard/hook/useParticipants.ts (1)
  • useApproveParticipants (33-46)
🔇 Additional comments (3)
src/features/dashboard/ui/ParticipantCard.tsx (3)

8-16: ParticipantCardProps와 실제 사용 간 불일치

checked, onChange 프롭이 명세돼 있지만 컴포넌트 내부에서는 전혀 참조되지 않습니다.
사용 계획이 없다면 타입 정의에서 제거하고, 필요하다면 렌더/로직에 반영해 dead-code 를 없애 주세요.
[suggest_nitpick]


15-17: useApproveParticipants 인자 의미 불일치

participant.idorderId 자리로 넘기면서 의미가 뒤섞였습니다.
API가 참가자 ID를 요구한다면 훅 시그니처와 타입을 participantId로 전면 수정하거나, 별도 훅을 분리해 명확성을 확보하세요.
이대로 두면 후속 개발자에게 큰 혼란을 줄 수 있습니다.
[suggest_essential_refactor]


65-66: mutate 호출 파라미터가 무시됨

훅 생성 시 이미 participant.id를 클로저로 캡처했으므로 아래 인자는 불필요합니다.
현재 구조에선 전달된 객체가 mutationFn 안에서 사용되지 않아 dead argument 가 됩니다.

- onClick={() => approveParticipant({ orderId: participant.id })}
+ onClick={() => approveParticipant()}

혹은 훅을 리팩터링해 mutate 시점에 파라미터를 받도록 일관성을 맞춰 주세요.
[suggest_optional_refactor] [request_verification]

✨ 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.

@github-actions
Copy link
Copy Markdown

@xaexunxang xaexunxang removed the request for review from Yejiin21 June 17, 2025 14:50
@xaexunxang
Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jun 17, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@xaexunxang xaexunxang merged commit 5da0391 into develop Jun 20, 2025
2 checks passed
@xaexunxang xaexunxang deleted the fix/#182/participant-card branch June 20, 2025 05:57
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] 구매/참여자 카드 api 호출 Hook 함수 오타 수정

2 participants