Conversation
📝 WalkthroughWalkthrough매니저용 클럽 멤버 지원서 기능이 추가되었습니다. API 레이어에 Possibly related PRs
🚥 Pre-merge checks | ✅ 1 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/pages/Manager/ManagedApplicationList/index.tsx (1)
103-104: 빈 목록 상태 UI를 추가하면 UX가 좋아집니다.Line 103-104에서 항목이 0개면 영역이 비어 보입니다. 탭별 빈 상태 메시지를 넣는 것을 권장합니다.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/pages/Manager/ManagedApplicationList/index.tsx` around lines 103 - 104, The view currently maps currentList?.applications to Card and shows nothing when the array is empty; update the ManagedApplicationList render to detect when currentList?.applications is empty (e.g., !currentList || currentList.applications.length === 0) and render a tab-specific empty state component or message instead of the map; locate the mapping code around currentList?.applications.map(...) and replace or wrap it with a conditional that renders a reusable Empty/Placeholder UI (with explanatory text and an action button if appropriate) so each tab shows a clear empty-state message.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/pages/Manager/ManagedApplicationList/index.tsx`:
- Around line 26-27: The two hooks useGetManagedApplications and
useGetManagedMemberApplications are always invoked regardless of activeTab, so
if the inactive tab's useSuspenseQuery fails it blocks rendering; update the
component to only call each hook when its tab is active (or wrap each tab pane
in its own Suspense boundary) and add error handling for
useGetManagedMemberApplications (e.g., catch or error boundary) so
member-application API errors don't bubble up; specifically, conditionally
invoke useGetManagedApplications when activeTab === 'applications' (or render
its Suspense-wrapped pane) and conditionally invoke
useGetManagedMemberApplications when activeTab === 'members' (or wrap it with
its own Suspense/ErrorBoundary) to prevent inactive-tab API failures from
affecting the active tab.
---
Nitpick comments:
In `@src/pages/Manager/ManagedApplicationList/index.tsx`:
- Around line 103-104: The view currently maps currentList?.applications to Card
and shows nothing when the array is empty; update the ManagedApplicationList
render to detect when currentList?.applications is empty (e.g., !currentList ||
currentList.applications.length === 0) and render a tab-specific empty state
component or message instead of the map; locate the mapping code around
currentList?.applications.map(...) and replace or wrap it with a conditional
that renders a reusable Empty/Placeholder UI (with explanatory text and an
action button if appropriate) so each tab shows a clear empty-state message.
ℹ️ Review info
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
src/apis/club/index.tssrc/pages/Manager/ManagedApplicationList/index.tsxsrc/pages/Manager/hooks/useManagedMemberApplications.ts
There was a problem hiding this comment.
🧹 Nitpick comments (2)
src/pages/Manager/ManagedMemberApplicationDetail/index.tsx (2)
89-99: 모달 접근성: Escape 키 지원 고려이미지 모달에서 Escape 키로 닫기 기능을 추가하면 접근성이 향상됩니다.
♻️ Escape 키 핸들링 예시
import { useEffect } from 'react'; // 컴포넌트 내부에 추가 useEffect(() => { if (!isImageOpen) return; const handleKeyDown = (e: KeyboardEvent) => { if (e.key === 'Escape') closeImage(); }; window.addEventListener('keydown', handleKeyDown); return () => window.removeEventListener('keydown', handleKeyDown); }, [isImageOpen, closeImage]);🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/pages/Manager/ManagedMemberApplicationDetail/index.tsx` around lines 89 - 99, The image modal rendered when isImageOpen and application.feePaymentImageUrl are truthy currently lacks keyboard handling; add an effect inside the component that listens for 'keydown' while isImageOpen is true and calls closeImage() when e.key === 'Escape', and ensure the listener is removed on cleanup; place this useEffect near the Portal/modal code so it references isImageOpen and closeImage and does window.addEventListener('keydown', ...) / window.removeEventListener(...).
8-10:params가 undefined일 때 NaN 발생 가능
Number(undefined)는NaN을 반환합니다. 방어적 코드를 추가하거나, 상위에서 이미 라우트 파라미터가 보장된다면 무시해도 됩니다.♻️ 방어적 코드 예시
const params = useParams(); -const clubId = Number(params.clubId); -const userId = Number(params.userId); +const clubId = Number(params.clubId) || 0; +const userId = Number(params.userId) || 0;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/pages/Manager/ManagedMemberApplicationDetail/index.tsx` around lines 8 - 10, useParams() may return undefined keys so Number(params.clubId) / Number(params.userId) can produce NaN; update the code around useParams, params, clubId and userId to defensively handle missing route params: extract the raw params (e.g. clubId and userId strings), validate they exist and are numeric (or provide a safe fallback), and either convert with a safe parse (rejecting NaN) or early-return/redirect/error if missing; ensure any downstream code using clubId/userId expects the validated numeric values.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/pages/Manager/ManagedMemberApplicationDetail/index.tsx`:
- Around line 89-99: The image modal rendered when isImageOpen and
application.feePaymentImageUrl are truthy currently lacks keyboard handling; add
an effect inside the component that listens for 'keydown' while isImageOpen is
true and calls closeImage() when e.key === 'Escape', and ensure the listener is
removed on cleanup; place this useEffect near the Portal/modal code so it
references isImageOpen and closeImage and does
window.addEventListener('keydown', ...) / window.removeEventListener(...).
- Around line 8-10: useParams() may return undefined keys so
Number(params.clubId) / Number(params.userId) can produce NaN; update the code
around useParams, params, clubId and userId to defensively handle missing route
params: extract the raw params (e.g. clubId and userId strings), validate they
exist and are numeric (or provide a safe fallback), and either convert with a
safe parse (rejecting NaN) or early-return/redirect/error if missing; ensure any
downstream code using clubId/userId expects the validated numeric values.
ℹ️ Review info
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
src/App.tsxsrc/apis/club/index.tssrc/pages/Manager/ManagedApplicationList/index.tsxsrc/pages/Manager/ManagedMemberApplicationDetail/index.tsxsrc/pages/Manager/ManagedMemberList/index.tsxsrc/pages/Manager/hooks/useManagedApplications.tssrc/utils/hooks/useSmartBack.ts
Summary by CodeRabbit