미션 제출 로직 수정#522
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthrough두 개의 카드 컴포넌트를 수정했습니다. 미션 카드에서는 마감 정보 텍스트에 Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/components/card/my-homework-status-card.tsx (1)
37-50:⚠️ Potential issue | 🟠 Major종료 상태 판별이 좁아 일부 미제출 사용자에게 안내 문구가 사라집니다.
isSubmissionEnded를ENDED로만 판별하면, 미션이EVALUATION_COMPLETED인 경우에도NOT_SUBMITTED사용자에게 종료 안내가 비어 보일 수 있습니다. 종료 상태 범위를 확장해 주세요.🔧 제안 수정안
- const isSubmissionOpen = mission?.status === 'IN_PROGRESS'; - const isSubmissionEnded = mission?.status === 'ENDED'; + const isSubmissionOpen = mission?.status === 'IN_PROGRESS'; + const isSubmissionEnded = + mission?.status === 'ENDED' || + mission?.status === 'EVALUATION_COMPLETED'; + const submissionStatusMessage = isSubmissionOpen + ? '아직 과제를 제출하지 않았습니다.' + : isSubmissionEnded + ? '제출 기간이 종료되었습니다.' + : ''; @@ - <span className="text-text-subtlest font-designer-14r"> - {isSubmissionOpen && '아직 과제를 제출하지 않았습니다.'} - </span> - <span className="text-text-subtlest font-designer-14r"> - {isSubmissionEnded && '제출 기간이 종료되었습니다.'} - </span> + <span className="text-text-subtlest font-designer-14r"> + {submissionStatusMessage} + </span>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/card/my-homework-status-card.tsx` around lines 37 - 50, The current end-state check (isSubmissionEnded) only treats mission?.status === 'ENDED' as finished, which hides the "submission ended" message for NOT_SUBMITTED users when the mission is in EVALUATION_COMPLETED; update the isSubmissionEnded boolean to include additional terminal statuses (e.g., mission?.status === 'ENDED' || mission?.status === 'EVALUATION_COMPLETED') so the conditional rendering that uses isSubmissionEnded (and the surrounding logic with isSubmissionOpen and myHomework.homeworkStatus === 'NOT_SUBMITTED') will correctly show the "제출 기간이 종료되었습니다." message for those cases.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@src/components/card/my-homework-status-card.tsx`:
- Around line 37-50: The current end-state check (isSubmissionEnded) only treats
mission?.status === 'ENDED' as finished, which hides the "submission ended"
message for NOT_SUBMITTED users when the mission is in EVALUATION_COMPLETED;
update the isSubmissionEnded boolean to include additional terminal statuses
(e.g., mission?.status === 'ENDED' || mission?.status ===
'EVALUATION_COMPLETED') so the conditional rendering that uses isSubmissionEnded
(and the surrounding logic with isSubmissionOpen and myHomework.homeworkStatus
=== 'NOT_SUBMITTED') will correctly show the "제출 기간이 종료되었습니다." message for those
cases.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 9148425f-b632-4e5b-8211-6c2c9e8a62d9
📒 Files selected for processing (2)
src/components/card/mission-card.tsxsrc/components/card/my-homework-status-card.tsx
🌱 연관된 이슈
☘️ 작업 내용
🍀 참고사항
스크린샷 (선택)
Summary by CodeRabbit
릴리스 노트