Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Walkthrough17개 파일의 import 경로를 업데이트했습니다. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
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.
Pull request overview
This PR refactors the project structure to align with Feature-Sliced Design (FSD) architecture by consolidating mock data files, relocating utilities, and standardizing file naming conventions. The changes improve code organization and maintainability without altering functionality.
Key Changes:
- Consolidated all mock data from
src/mocks/,src/data/, andsrc/constants/into a singlesrc/mocks/directory with standardized.mock.tsnaming convention - Moved Google Analytics utilities from
src/lib/ga.tstosrc/shared/lib/analytics/ga.tsto follow FSD architecture - Renamed store files from
useXxxStore.tstoxxxStore.tspattern while keeping exported hook names unchanged
Reviewed changes
Copilot reviewed 19 out of 29 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/stores/replyStore.ts | Renamed from useReplyStore.ts - manages reply state for comments |
| src/stores/popupStore.ts | Renamed from usePopupStore.ts - manages popup/modal state with type definitions |
| src/stores/commentBottomSheetStore.ts | Renamed from useCommentBottomSheetStore.ts - manages bottom sheet state for comments |
| src/stores/authReadyStore.ts | Renamed from useAuthReadyStore.ts - manages authentication ready state |
| src/shared/lib/analytics/ga.ts | Moved from src/lib/ga.ts - Google Analytics initialization and tracking utilities |
| src/mocks/user.mock.ts | Renamed from userData.ts - mock user profile data |
| src/mocks/today.mock.ts | Renamed from today-constants.ts - mock message data for "today's words" feature |
| src/mocks/post.mock.ts | Renamed from postData.ts - mock post, feed, and comment data |
| src/mocks/group.mock.ts | Renamed from groupDetail.mock.ts - mock group detail data |
| src/mocks/book.mock.ts | Renamed from bookData.ts - mock book data |
| src/main.tsx | Updated import path for GA initialization |
| src/components/common/Layout.tsx | Updated import path for sendPageView function |
| src/components/common/MainHeader.tsx | Updated import path for useAuthReadyStore |
| src/hooks/useSocialLoginToken.ts | Updated import path for useAuthReadyStore |
| src/hooks/useReplyActions.ts | Updated import path for useReplyStore |
| src/hooks/usePopupActions.ts | Updated import paths for usePopupStore and types |
| src/pages/feed/FeedDetailPage.tsx | Updated import path for useReplyStore |
| src/pages/memory/Memory.tsx | Updated import path for useCommentBottomSheetStore |
| src/pages/groupDetail/GroupDetail.tsx | Updated import path for usePopupStore |
| src/pages/searchBook/SearchBook.tsx | Updated import path for usePopupStore |
| src/components/memory/RecordItem/RecordItem.tsx | Updated import path for useCommentBottomSheetStore |
| src/components/common/CommentBottomSheet/GlobalCommentBottomSheet.tsx | Updated import paths for useReplyStore and useCommentBottomSheetStore |
| src/components/feed/UserProfileItem.tsx | Updated import path for usePopupStore |
| src/components/feed/Profile.tsx | Updated import path for usePopupStore |
| src/components/common/Modal/PopupContainer.tsx | Updated import paths for usePopupStore and types |
| src/components/common/Modal/ConfirmModal.tsx | Updated import path for ConfirmModalProps type |
| src/components/common/Modal/MoreMenu.tsx | Updated import path for MoreMenuProps type |
| src/components/common/Modal/ReplyModal.tsx | Updated import path for ReplyModalProps type |
| src/components/common/Modal/Snackbar.tsx | Updated import path for SnackbarProps type |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/main.tsx (1)
4-4: Analytics 모듈 경로가 FSD 구조에 맞게 업데이트되었습니다.Google Analytics 유틸리티가 shared layer로 올바르게 이동되었습니다. 다만 상대 경로(
./shared)를 사용하고 있는데, 다른 파일들(예: Layout.tsx)에서는 alias(@/shared)를 사용하고 있습니다.선택사항: 경로 표기 일관성 개선
프로젝트 전체에서 일관성을 위해 alias를 사용하는 것을 고려해보세요:
-import { initGA } from './shared/lib/analytics/ga'; +import { initGA } from '@/shared/lib/analytics/ga';
📜 Review details
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (29)
src/components/common/CommentBottomSheet/GlobalCommentBottomSheet.tsxsrc/components/common/Layout.tsxsrc/components/common/MainHeader.tsxsrc/components/common/Modal/ConfirmModal.tsxsrc/components/common/Modal/MoreMenu.tsxsrc/components/common/Modal/PopupContainer.tsxsrc/components/common/Modal/ReplyModal.tsxsrc/components/common/Modal/Snackbar.tsxsrc/components/feed/Profile.tsxsrc/components/feed/UserProfileItem.tsxsrc/components/memory/RecordItem/RecordItem.tsxsrc/hooks/usePopupActions.tssrc/hooks/useReplyActions.tssrc/hooks/useSocialLoginToken.tssrc/main.tsxsrc/mocks/book.mock.tssrc/mocks/group.mock.tssrc/mocks/post.mock.tssrc/mocks/today.mock.tssrc/mocks/user.mock.tssrc/pages/feed/FeedDetailPage.tsxsrc/pages/groupDetail/GroupDetail.tsxsrc/pages/memory/Memory.tsxsrc/pages/searchBook/SearchBook.tsxsrc/shared/lib/analytics/ga.tssrc/stores/authReadyStore.tssrc/stores/commentBottomSheetStore.tssrc/stores/popupStore.tssrc/stores/replyStore.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Agent
🔇 Additional comments (18)
src/components/memory/RecordItem/RecordItem.tsx (1)
6-6: LGTM! import 경로 업데이트가 올바르게 적용되었습니다.스토어 파일명 표준화에 따라 import 경로가 정확하게 변경되었으며, 훅 사용법은 그대로 유지되어 동작에 영향이 없습니다.
src/components/common/CommentBottomSheet/GlobalCommentBottomSheet.tsx (1)
8-9: LGTM! 두 스토어의 import 경로가 정확하게 업데이트되었습니다.
replyStore와commentBottomSheetStore모두 새로운 네이밍 컨벤션에 맞게 import 경로가 변경되었으며, 훅 사용은 변경 없이 정상적으로 유지됩니다.src/pages/groupDetail/GroupDetail.tsx (1)
48-48: LGTM! popupStore import 경로가 올바르게 변경되었습니다.스토어 파일명 표준화에 따라 import 경로가 정확하게 업데이트되었으며, Zustand 스토어 사용 패턴은 그대로 유지됩니다.
src/components/common/Modal/Snackbar.tsx (1)
3-3: LGTM! 타입 import 경로가 정확하게 변경되었습니다.
SnackbarProps타입의 import 경로가 새로운 스토어 모듈 경로로 올바르게 업데이트되었으며, 컴포넌트 동작에는 영향이 없습니다.src/pages/feed/FeedDetailPage.tsx (1)
15-15: 좋습니다! replyStore import 경로가 올바르게 변경되었습니다.스토어 파일명 표준화에 따라 모든 import 경로가 일관되게 업데이트되었습니다. 검증 결과 이전 네이밍 패턴(
from '@/stores/use[A-Z])은 코드베이스에 남아있지 않으며, 4개의 스토어 파일(authReadyStore, commentBottomSheetStore, popupStore, replyStore)이 모두 새로운 표준명을 따르고 있습니다. 21개의 import 문이 모두 일관되게 변경되었으며, 훅 사용법은 그대로 유지되어 동작에 영향이 없습니다.src/hooks/useReplyActions.ts (1)
1-1: import 경로 변경이 올바르게 적용되었습니다.store 파일 네이밍 표준화에 따라 import 경로가 정확하게 업데이트되었습니다. hook 이름은
useReplyStore로 유지되어 기존 사용 방식과 호환됩니다.src/components/feed/UserProfileItem.tsx (1)
8-8: import 경로 업데이트가 정확합니다.popup store의 경로가 새로운 네이밍 컨벤션에 맞게 변경되었으며, hook 사용 방식은 그대로 유지됩니다.
src/components/common/MainHeader.tsx (1)
9-9: import 경로가 표준화된 네이밍 컨벤션을 따릅니다.auth ready store의 파일 경로가 올바르게 변경되었으며,
useAuthReadyStorehook은 기존과 동일하게 사용됩니다.src/hooks/useSocialLoginToken.ts (1)
4-4: store import 경로가 올바르게 변경되었습니다.파일 네이밍 표준화에 따라 authReadyStore 경로가 정확하게 업데이트되었습니다.
src/pages/searchBook/SearchBook.tsx (1)
42-42: import 경로가 정확하게 업데이트되었습니다.PopupStore의 import 경로가 새로운 표준(
@/stores/popupStore)에 맞게 변경되었으며, 훅 사용(line 70)과 직접 store 접근(line 235)이 모두 올바르게 작동합니다. 전체 코드베이스에서 이전 import 경로가 제거되었고 새로운 경로로 일관되게 업데이트되었습니다.src/components/common/Modal/MoreMenu.tsx (1)
3-3: 타입 import 경로가 올바르게 업데이트되었습니다.타입 import 경로가 새로운 store 파일 위치를 정확하게 반영하고 있습니다.
src/pages/memory/Memory.tsx (1)
9-9: Store import 경로가 올바르게 업데이트되었습니다.
commentBottomSheetStore파일의 새로운 위치를 정확하게 반영하고 있으며, 내보낸 훅의 이름은 그대로 유지되어 기존 코드와의 호환성이 보장됩니다.src/hooks/usePopupActions.ts (1)
6-7: import 경로 업데이트가 올바르게 적용되었습니다.Store 파일 네이밍 컨벤션 변경에 따라 import 경로가
@/stores/popupStore로 정확하게 업데이트되었으며, 내보낸 훅의 이름(usePopupStore)은 일관되게 유지됩니다. 코드베이스 전체에서 이전 경로에 대한 참조가 없음을 확인했습니다.src/components/common/Layout.tsx (1)
5-5: Analytics 모듈 경로가 올바르게 업데이트되었습니다.Google Analytics 유틸리티의 새로운 경로(
@/shared/lib/analytics/ga)를 정확하게 반영하고 있으며, alias를 사용하여 명확한 경로 표현을 제공합니다.sendPageView함수가 35번 줄에서 올바르게 사용 중이며, 이전 import 경로는 코드베이스에서 완전히 제거되었습니다.src/components/feed/Profile.tsx (1)
5-5: LGTM! 깔끔한 리팩토링입니다.스토어 파일 네이밍 컨벤션에 맞춰 import 경로가 올바르게 업데이트되었습니다. 훅 이름(
usePopupStore)은 그대로 유지되어 기존 코드와의 호환성이 보장됩니다.src/components/common/Modal/ConfirmModal.tsx (1)
3-3: LGTM! 타입 import 경로가 올바르게 업데이트되었습니다.스토어 모듈 경로 변경에 맞춰
ConfirmModalProps타입 import가 정확히 수정되었습니다. 런타임 동작에는 영향이 없습니다.src/components/common/Modal/ReplyModal.tsx (1)
6-6: LGTM! 타입 import 경로 업데이트가 정확합니다.새로운 스토어 모듈 경로에 맞춰
ReplyModalProps타입 import가 올바르게 변경되었습니다.src/components/common/Modal/PopupContainer.tsx (1)
2-2: LGTM! 일관된 import 경로 업데이트입니다.
usePopupStore훅과 관련 타입들의 import 경로가 새로운 모듈 위치에 맞춰 일관되게 업데이트되었습니다. 훅 사용(line 18) 및 타입 사용(lines 44, 49, 51, 55, 61)이 모두 정상적으로 유지됩니다.Also applies to: 15-15
#️⃣ 연관된 이슈
https://thip2025.atlassian.net/browse/THIP2025-396?atlOrigin=eyJpIjoiMDI4OWIwYzMxZmFmNDQwNTg4ZjA1NWEzZWFiZTc0MjAiLCJwIjoiaiJ9
📝 작업 내용
프로젝트의 폴더 구조를 FSD(Feature-Sliced Design) 아키텍처에 맞게 재구성하고, 파일 네이밍 컨벤션을 표준화했습니다.
1. 목업 데이터 통합 및 재구성
src/mocks/,src/data/,src/constants/3개 폴더에 분산되어 관리의 어려움src/mocks/단일 폴더로 통합.mock.ts형식으로 통일bookData.ts→book.mock.tspostData.ts→post.mock.tsuserData.ts→user.mock.tstoday-constants.ts→today.mock.tsgroupDetail.mock.ts→group.mock.tssrc/data/,src/constants/폴더 삭제2. Google Analytics 유틸리티 FSD 구조 적용
src/lib/폴더에ga.ts단일 파일만 존재하여 구조적으로 비효율적shared레이어 구조 미적용src/shared/lib/analytics/경로로 이동3. Store 파일 네이밍 컨벤션 표준화
useXxxStore.ts형식으로 React Hook prefix 포함xxxStore.ts형식으로 변경하여 store 정의 파일임을 명확히 표현useAuthReadyStore.ts→authReadyStore.tsuseCommentBottomSheetStore.ts→commentBottomSheetStore.tsusePopupStore.ts→popupStore.tsuseReplyStore.ts→replyStore.tsxxxStore.ts(store 정의)useXxxStore(hook)Summary by CodeRabbit
릴리스 노트
사용자 영향: 없음. 이 변경사항은 내부 코드 구조 개선으로 기능상 변화가 없습니다.
✏️ Tip: You can customize this high-level summary in your review settings.