Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 Walkthrough개요스토어 상세 페이지 기능을 추가하며, 레이아웃 패딩을 제거하고 동적 라우트 페이지, UI 컴포넌트, 타입 정의, 모의 데이터를 구현했습니다. 변경 사항
시퀀스 다이어그램sequenceDiagram
participant User as 사용자
participant Page as StoreDetailPage<br/>(서버)
participant MockData as MockData<br/>MOCK_MAIN_STORE_DETAIL_MAP
participant Content as StoreDetailContent<br/>(클라이언트)
participant MenuCard as StoreMenuCard<br/>(클라이언트)
User->>Page: /store/[id]로 이동
Page->>Page: params에서 ID 파싱
Page->>MockData: 스토어 ID로 데이터 조회
alt 스토어 존재
MockData-->>Page: StoreDetailItem 반환
Page->>Content: store prop 전달
Content->>Content: 현재 요일 기준 영업시간 계산
Content-->>User: 스토어 정보 및 메뉴 렌더링
Content->>MenuCard: 각 메뉴 항목 렌더링
MenuCard-->>User: 메뉴 카드 표시
else 스토어 미존재
Page->>Page: notFound() 호출
Page-->>User: 404 페이지
end
예상 코드 리뷰 소요 시간🎯 3 (보통) | ⏱️ ~20분 관련 가능성 있는 PR
시
🚥 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.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/customer/src/app/`(tabs)/layout.tsx:
- Line 47: 공통 레이아웃의 하단 여백이 제거되어 스크롤 마지막 항목이 탭바에 가려지는 문제이므로, 레이아웃의 루트 스크롤 컨테이너(현재
클래스 "ds-scrollbar-hidden flex-1 overflow-y-auto"가 적용된 div)를 수정해 탭바 높이만큼의 하단 패딩을
복원하거나 safe-area-inset을 적용하세요(예: pb-safe 또는 pb-[3.2rem] 등 앱에서 사용하는 기준). 또한 개별
컴포넌트(MainListView.tsx의 pb-[2rem], order/page.tsx의 pb-[3.2rem])와 중복되지 않도록 조정하여
모바일에서 마지막 콘텐츠가 탭바 뒤에 숨지 않도록 보장하세요.
In `@apps/customer/src/app/`(tabs)/main/store/_components/StoreDetailContent.tsx:
- Line 51: currentBusinessText is hardcoded to "영업중" and therefore misreports
store status; change it to a neutral display until proper open/closed logic is
implemented by removing the "영업중" prefix. In the StoreDetailContent component
replace the string construction that uses currentBusinessText with a neutral
text showing only the hours (use todayHours.open and todayHours.close) or a
generic label like "영업시간" plus the time range, and ensure no time-comparison
logic is assumed until you add a real status calculation.
In `@apps/customer/src/app/`(tabs)/main/store/_constants/mockStoreDetail.ts:
- Around line 358-360: Summary: The type assertion for
MOCK_MAIN_STORE_DETAIL_MAP incorrectly claims every numeric key exists; change
it to a partial record. Change the assertion on MOCK_MAIN_STORE_DETAIL_MAP from
Record<number, StoreDetailItem> to Partial<Record<number, StoreDetailItem>> so
the type matches runtime (only IDs from MOCK_MAIN_STORE_DETAIL_LIST exist) and
keep/use the existing guard checks like if (!store) where callers must handle
undefined; update any callers that assumed non-null to handle possibly undefined
StoreDetailItem values.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 24de9b25-945b-46dc-a174-dca5c47b724b
⛔ Files ignored due to path filters (6)
apps/customer/public/images/mock/store/store-1.jpgis excluded by!**/*.jpgpackages/design-system/src/icons/generated/iconNames.tsis excluded by!**/generated/**packages/design-system/src/icons/generated/spriteSymbols.tsis excluded by!**/generated/**packages/design-system/src/icons/source/Menu.svgis excluded by!**/*.svgpackages/design-system/src/icons/source/ToggleDown.svgis excluded by!**/*.svgpackages/design-system/src/icons/source/ToggleUp.svgis excluded by!**/*.svg
📒 Files selected for processing (6)
apps/customer/src/app/(tabs)/layout.tsxapps/customer/src/app/(tabs)/main/store/[id]/page.tsxapps/customer/src/app/(tabs)/main/store/_components/StoreDetailContent.tsxapps/customer/src/app/(tabs)/main/store/_components/StoreMenuCard.tsxapps/customer/src/app/(tabs)/main/store/_constants/mockStoreDetail.tsapps/customer/src/app/(tabs)/main/store/_types/store-detail.ts
✅ 작업 내용
📝 Description
상점 보러가기버튼과 상세 페이지(/main/store/[id]) 연결TabsLayoutwidth 제한 제거로 상세 페이지 반응형 이슈 수정🚀 설계 의도 및 개선점
TabsLayout의 width 제한에서 발생해 레이아웃 구조를 수정했습니다.📸 스크린샷 (선택)
📎 기타 참고사항
Fixes #63
Summary by CodeRabbit
릴리스 노트
새로운 기능
UI/UX 개선