Conversation
- 과제 제출: 리더/참가자 모두 가능하도록 !isLeader guard 제거 - 피어 리뷰: 리더/참가자 모두 작성 가능 (자기 과제 제외 guard 유지) - 리더 평가 UI 전체 제거 (LeaderEvaluationSection, CreateEvaluationModal 참조 삭제) - MissionDetailContent에서 불필요한 groupStudyId prop 제거 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- MyHomeworkStatusCard에서 useGetMission, useUserStore, useRouter로 데이터 자체 조달 - TanStack Query 캐시 공유를 활용하여 네트워크 요청 중복 없이 동작 - useSubmitHomework onSuccess에 mission 캐시 invalidation 추가 (onRefetch prop 대체) - MissionDetailContent에서 myHomework useMemo, isMissionClosed 등 제거 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 Walkthrough요약여러 컴포넌트에서 prop drilling을 제거하고 내부 데이터 파생을 도입했습니다. MyHomeworkStatusCard는 이제 WalkthroughMyHomeworkStatusCard가 내부에서 미션/내 숙제 데이터를 파생하도록 변경되고, HomeworkDetailContent에서 리더 평가 섹션이 제거되며 MissionDetailContent/사용처에서 Changes
Sequence Diagram(s)(생성 조건 미충족 — 생략) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 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 unit tests (beta)
No actionable comments were generated in the recent review. 🎉 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/contents/homework-detail-content.tsx (1)
23-32: 🛠️ Refactor suggestion | 🟠 Major사용되지 않는
groupStudyIdprop을 제거해 주세요.
groupStudyId가 인터페이스에 정의되어 있고 구조 분해 할당되지만, 컴포넌트 내부에서 실제로 사용되지 않습니다. 다른 컴포넌트들(MissionDetailContent)에서 이미groupStudyId를 제거했으므로, 일관성을 위해 여기서도 제거하는 것이 좋습니다.♻️ 사용되지 않는 prop 제거
interface HomeworkDetailContentProps { - groupStudyId: number; missionId: number; homeworkId: number; } export default function HomeworkDetailContent({ homeworkId, missionId, }: HomeworkDetailContentProps) {또한
src/components/section/mission-section.tsx의 호출 부분도 업데이트가 필요합니다:<HomeworkDetailContent - groupStudyId={groupStudyId} missionId={Number(missionId)} homeworkId={Number(homeworkId)} />
🧹 Nitpick comments (1)
src/components/card/my-homework-status-card.tsx (1)
22-30: 로딩 상태 처리를 고려해 주세요.
useGetMission에서 데이터를 로딩하는 동안mission이undefined이므로,myHomework가null로 설정되어 "아직 과제를 제출하지 않았습니다" UI가 잠깐 표시될 수 있습니다. 로딩 상태에서는 스켈레톤이나null을 반환하는 것이 UX 측면에서 더 좋을 수 있습니다.💡 로딩 상태 처리 제안
const { data: mission } = useGetMission(missionId); + + const isLoading = !mission; const myHomework = useMemo(() => { if (!mission?.homeworks || !memberId) return null; return mission.homeworks.find((hw) => hw.submitterId === memberId) ?? null; }, [mission?.homeworks, memberId]); const isMissionClosed = mission?.status === 'ENDED'; + if (isLoading) { + return null; // 또는 스켈레톤 UI + } + // 미제출 상태
🌱 연관된 이슈
☘️ 작업 내용
🍀 참고사항
스크린샷 (선택)
Summary by CodeRabbit
리팩토링
개선사항
제거