Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning
|
| 코호트 / 파일 | 요약 |
|---|---|
ClubDetailPage 컴포넌트 frontend/src/pages/ClubDetailPage/components/ClubApplyButton/ClubApplyButton.tsx, frontend/src/pages/ClubDetailPage/components/ShareButton/ShareButton.tsx |
클럽 식별자 처리 변경: clubId에서 clubDetail.id 기반으로 전환. ClubApplyButton에서 라우트 파라미터 처리 확장(clubName 포함), 데이터 페칭 및 신청 관련 API 호출 업데이트. ShareButton에서 공유 URL을 '@' 구분자를 사용한 클럽명 기반 형식으로 변경. |
예상 코드 리뷰 소요 시간
🎯 3 (Moderate) | ⏱️ ~20 분
관련 가능성 있는 PR
- [release] FE #1260: 클럽 라우팅에 clubName/@-접두어 기반 경로를 도입하며, 이 PR의 clubName 파라미터 처리 및 clubDetail.id 사용과 직접적으로 연결됨
- [refactor] 클럽 지원 양식 불러오기 구버전 api를 제거한다 #793: 백엔드의 /api/club/{clubId}/apply 엔드포인트 변경사항이 이 PR의 프론트엔드 신청 관련 API 호출 변경에 직접 영향을 미킴
- [feature] ClubDetailPage에서 공유 버튼 표시 활성화 #1119: ClubDetailPage의 ShareButton 및 ClubApplyButton 컴포넌트 변경사항을 포함하며, 동일 컴포넌트 수정으로 직접 관련됨
제안 레이블
🐞 Bug
제안 검토자
- oesnuj
- seongwon030
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | PR 제목이 지원서 목록이 비어있던 문제 수정이라는 실질적인 변경 사항을 명확하게 요약하고 있으며, 코드 변경 내용과 일치합니다. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing Touches
- 📝 Generate docstrings (stacked PR)
- 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Post copyable unit tests in a comment
- Commit unit tests in branch
fix/#1305-why-apply-cant-MOA-731
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 @coderabbitai help to get the list of available commands and usage tips.
🎨 UI 변경사항을 확인해주세요
11개 스토리 변경 · 전체 58개 스토리 · 23개 컴포넌트 |
There was a problem hiding this comment.
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)
frontend/src/pages/ClubDetailPage/components/ClubApplyButton/ClubApplyButton.tsx (1)
22-39:⚠️ Potential issue | 🟡 Minorname 기반 라우트에서
clubId가드가 불필요합니다
/clubDetail/@:clubName경로로 진입할 때clubId는undefined가 되어 현재 가드 조건!clubId || !clubDetail에서 컴포넌트가null을 반환합니다. 다만clubDetail은(clubName ?? clubId)로 이미 조회되었고, 컴포넌트에서는clubDetail.id를 사용할 뿐clubId파라미터 자체는 필요하지 않습니다.가드를 다음과 같이 단순화하세요:
-if (!clubId || !clubDetail) return null; +if (!clubDetail) return null;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@frontend/src/pages/ClubDetailPage/components/ClubApplyButton/ClubApplyButton.tsx` around lines 22 - 39, The current guard `if (!clubId || !clubDetail) return null;` incorrectly hides the component for name-based routes where clubId is undefined; change the guard to only check clubDetail (e.g., `if (!clubDetail) return null;`) so the component renders when clubDetail is loaded, and keep using `clubDetail.id` where needed; update any tests or usages that assumed clubId presence if applicable.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@frontend/src/pages/ClubDetailPage/components/ShareButton/ShareButton.tsx`:
- Line 27: The share URL is built using clubDetail.name which can contain spaces
or special characters and break routing; update the URL construction in
ShareButton.tsx (the url constant using MOADONG_BASE_URL and clubDetail.name) to
URL-encode the club name before inserting it into the path (e.g., use
JavaScript's encodeURIComponent on clubDetail.name) so the generated path
segment is safe across environments.
---
Outside diff comments:
In
`@frontend/src/pages/ClubDetailPage/components/ClubApplyButton/ClubApplyButton.tsx`:
- Around line 22-39: The current guard `if (!clubId || !clubDetail) return
null;` incorrectly hides the component for name-based routes where clubId is
undefined; change the guard to only check clubDetail (e.g., `if (!clubDetail)
return null;`) so the component renders when clubDetail is loaded, and keep
using `clubDetail.id` where needed; update any tests or usages that assumed
clubId presence if applicable.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: eac6dac1-69c2-4d6a-8165-819f376ceb30
📒 Files selected for processing (2)
frontend/src/pages/ClubDetailPage/components/ClubApplyButton/ClubApplyButton.tsxfrontend/src/pages/ClubDetailPage/components/ShareButton/ShareButton.tsx
#️⃣연관된 이슈
📝작업 내용
동아리 상세페이지를 id에서 이름으로 마이그레이션 후
동아리 지원서에 관한 API가 id로 유지되어야하는데 파라미터로 넘겨진 동아리 이름을 이용해 API에 조회하였음
아직 백엔드는 한글이름을 통해 API조회를 제공하지않는데 한글로 조회하니 404 응답.
따라서 지원서에는 아무런 목록이 보이지 않게됨..
중점적으로 리뷰받고 싶은 부분(선택)
논의하고 싶은 부분(선택)
🫡 참고사항
Summary by CodeRabbit
변경 사항