-
Notifications
You must be signed in to change notification settings - Fork 1
[Feat] 적금 상세 페이지 구현 #43
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
Conversation
|
Note
|
| 집단 / 파일 | 변경 요약 |
|---|---|
저축 상세 페이지 src/pages/savings-detail/savings-detail-page.css.ts, src/pages/savings-detail/savings-detail-page.tsx |
새로운 저축 상세 페이지 구성요소와 스타일 정의 추가. CSS 모듈은 detailContainer, bank, product, 옵션 관련 스타일 등 14개의 새로운 스타일 토큰 내보냄. React 컴포넌트는 productId/optionId 라우트 파라미터 읽기, API 데이터 페칭, 모의 데이터 사용 및 상세 정보 렌더링 구현 |
API 엔드포인트 업데이트 src/shared/api/endpoints.ts |
SAVINGS_DETAIL, DEPOSITS_DETAIL, SAVINGS_COMPARE, DEPOSITS_COMPARE 엔드포인트를 단일 ID 대신 (productId, optionId) 두 개 매개변수를 받도록 변경. URL 경로도 /products/savings/${id} → /savings/${productId}/${optionId} 형태로 수정 |
API 함수 서명 업데이트 src/shared/api/products.ts, src/shared/api/popularity.ts |
getSavingsDetail, getDepositsDetail, compareSavings, compareDeposits 함수의 매개변수를 (id: number)에서 (productId: number, optionId: number)로 변경 |
컴포넌트 업데이트 src/shared/components/savings/savings.tsx, src/shared/components/savings/savings.css.ts, src/shared/components/deposit/deposit.css.ts |
Savings 컴포넌트에 productId, optionId props 추가 및 클릭 시 /savings/{productId}/{optionId}로 네비게이션하는 동작 구현. 스타일에 width 속성 추가 (savings: '10rem', deposit: '7rem') |
라우팅 및 테마 src/shared/router/index.tsx, src/shared/router/path.ts, src/styles/theme.css.ts |
새로운 라우트 경로 SAVINGS_DETAIL: '/savings/:productId/:optionId' 추가. 라우터에 SavingsDetailPage 컴포넌트 등록. 테마에 새로운 크기 토큰 ms: '1.6rem' 추가 |
시퀀스 다이어그램
sequenceDiagram
actor User
participant Savings 컴포넌트
participant React Router
participant SavingsDetailPage
participant API
User->>Savings 컴포넌트: 저축 상품 클릭
Savings 컴포넌트->>React Router: navigate('/savings/{productId}/{optionId}')
React Router->>SavingsDetailPage: 라우트 매개변수 전달
SavingsDetailPage->>SavingsDetailPage: 컴포넌트 마운트, 상태 초기화
SavingsDetailPage->>API: getSavingsDetail(productId, optionId)
API-->>SavingsDetailPage: 상세 정보 반환
SavingsDetailPage->>SavingsDetailPage: res.result로 상태 업데이트
SavingsDetailPage->>User: 상세 페이지 렌더링 (헤더, 은행정보, 옵션, 유사상품)
예상 코드 리뷰 난이도
🎯 3 (보통) | ⏱️ ~25분
- 주의 필요 사항:
- API 엔드포인트 변경에 따른 모든 호출 사이트 업데이트 확인 필요 (products.ts, popularity.ts 함수들이 올바르게 두 매개변수를 전달하는지 확인)
- SavingsDetailPage 컴포넌트의 mock 데이터와 실제 API 데이터 통합 계획 확인 (코멘트에 언급된 향후 정리 사항)
- 새로운 라우트 경로 및 네비게이션 로직이 다른 페이지/컴포넌트와 일관성이 있는지 검증
- CSS 스타일 토큰 명명 규칙과 기존 코드베이스의 일관성 확인
📜 Recent review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Free
📒 Files selected for processing (11)
src/pages/savings-detail/savings-detail-page.css.ts(1 hunks)src/pages/savings-detail/savings-detail-page.tsx(1 hunks)src/shared/api/endpoints.ts(1 hunks)src/shared/api/popularity.ts(2 hunks)src/shared/api/products.ts(2 hunks)src/shared/components/deposit/deposit.css.ts(1 hunks)src/shared/components/savings/savings.css.ts(1 hunks)src/shared/components/savings/savings.tsx(2 hunks)src/shared/router/index.tsx(1 hunks)src/shared/router/path.ts(1 hunks)src/styles/theme.css.ts(1 hunks)
Note
🎁 Summarized by CodeRabbit Free
Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.
Comment @coderabbitai help to get the list of available commands and usage tips.
📌 Related Issue
✅ Checklist
📚 Tasks
⭐ PR Point (To Reviewer)
📷 Screenshot
Summary by CodeRabbit
New Features
Style