-
Notifications
You must be signed in to change notification settings - Fork 0
환불 버튼 비활성화 #401
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
환불 버튼 비활성화 #401
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughDisables refund actions in UI: one button is now always disabled in RegisteredExamCard, and the refund page’s submit button is commented out, leaving the submit handler without a visible control. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant U as User
participant RC as RegisteredExamCard
participant RP as RefundPage
Note over RC: Before -> conditional disable based on isRefunded
U->>RC: View exam registration
RC-->>U: Shows refund button (now always disabled)
Note over RP: Submit button removed from UI
U->>RP: Open refund page
RP-->>U: Renders form without submit control
U--xRP: Cannot trigger submit via UI
Note right of RP: Submit handler remains in code but is inaccessible from UI
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
📝 추가 및 변경된 파일총 1개 파일 변경 |
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.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
mosu-app/src/entities/exam/ui/RegisteredExamCard.tsx (1)
71-80: Hardcodingdisabled={true}creates UX and logic inconsistencies.This change introduces several issues:
Styling inconsistency: The button is always disabled, but the visual disabled state (opacity-50, cursor-not-allowed) only appears when
isRefundedis true. Users will see an enabled-looking button that doesn't work.Inconsistent button behavior: The first button uses conditional disabling (
disabled={isRefunded}), while this button is always disabled. This inconsistency is confusing.Dead code: The
onClickhandler,refundUrlconstant (lines 36-41), and routing logic are now unreachable since the button is always disabled.Broken user flow: Even if this button were enabled, the refund page (as seen in
mosu-app/src/pages/mypage/refund/[id]/index.tsx) has its submit button commented out, creating a dead-end user journey.If refunds need to be temporarily disabled, consider these alternatives:
- Remove the button entirely and show an informational message
- Use a feature flag to conditionally render the button
- Show a tooltip/modal explaining why refunds are unavailable
- Keep the conditional logic but update the condition (e.g., add a time-based check)
Apply this diff if refunds should be completely hidden:
- <footer className="my-5 flex rounded-lg border font-semibold"> + <footer className="my-5 flex rounded-lg border font-semibold [&>button:only-child]:border-none"> <button className={cn( - "flex-1 border-r-[0.5px] p-4 hover:cursor-pointer", + "flex-1 p-4 hover:cursor-pointer", isRefunded && "opacity-50 hover:cursor-not-allowed", )} onClick={() => router.push(appliedExamDetailUrl)} disabled={isRefunded} > 상세조회 </button> - <button - className={cn( - "flex-1 border-l-[0.5px] p-4 hover:cursor-pointer", - isRefunded && "opacity-50 hover:cursor-not-allowed", - )} - onClick={() => router.push(refundUrl)} - disabled={true} - > - 취소 및 환불 - </button> </footer>Alternatively, if refunds should be temporarily disabled but the UI should remain, add a clear disabled state:
+ const isRefundDisabled = true; // TODO: Remove when refunds are re-enabled + <footer className="my-5 flex rounded-lg border font-semibold"> <button className={cn( "flex-1 border-r-[0.5px] p-4 hover:cursor-pointer", isRefunded && "opacity-50 hover:cursor-not-allowed", )} onClick={() => router.push(appliedExamDetailUrl)} disabled={isRefunded} > 상세조회 </button> <button className={cn( "flex-1 border-l-[0.5px] p-4 hover:cursor-pointer", - isRefunded && "opacity-50 hover:cursor-not-allowed", + (isRefunded || isRefundDisabled) && "opacity-50 hover:cursor-not-allowed", )} onClick={() => router.push(refundUrl)} - disabled={true} + disabled={isRefundDisabled || isRefunded} + title={isRefundDisabled ? "환불 기능이 일시적으로 비활성화되었습니다" : undefined} > 취소 및 환불 </button> </footer>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
mosu-app/src/entities/exam/ui/RegisteredExamCard.tsx(1 hunks)mosu-app/src/pages/mypage/refund/[id]/index.tsx(1 hunks)
⏰ 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). (2)
- GitHub Check: Run DangerJS
- GitHub Check: Run Unit & Integration Tests
📚 Storybook이 Chromatic에 배포되었습니다!
|
✅ Linked Issue
🔍 What I did
💡 Why I did it
🧠 What I learned
🧪 How to test
🔧 Additional context
🚧 TODO (if any)
Summary by CodeRabbit
New Features
Chores
Known Impact