-
Notifications
You must be signed in to change notification settings - Fork 0
[refactor] 코드 개선 #28
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
[refactor] 코드 개선 #28
The head ref may contain hidden characters: "27-refactor-\uCF54\uB4DC-\uAC1C\uC120"
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the codebase by reorganizing the folder structure and updating imports. The main purpose is to improve code organization by grouping related pages into logical directories (User, Club, Council, Auth) and consolidating layout components.
- Restructured page directories: moved pages into User/, Club/, Council/, and Auth/ folders
- Consolidated Layout components into a single unified Layout component with props
- Normalized API endpoint paths by removing leading slashes
Reviewed changes
Copilot reviewed 14 out of 50 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/pages/User/Profile/index.tsx | New Profile component with form handling for user info updates |
| src/pages/User/Profile/hooks/useMyInfo.ts | Hook for fetching and updating user information |
| src/pages/User/MyPage/index.tsx | User's main page with profile stats and menu navigation |
| src/pages/User/MyPage/hooks/useWithdraw.ts | Hook for account deletion |
| src/pages/User/MyPage/hooks/useLogout.ts | Hook for logout functionality |
| src/pages/Home/index.tsx | Updated imports to reflect new Club folder structure |
| src/pages/Council/CouncilNotice/index.tsx | New component for displaying council notice details |
| src/pages/Council/CouncilNotice/hooks/useCouncilNoticeDetail.ts | Hook with optimistic update for notice read status |
| src/pages/Council/CouncilDetail/index.tsx | Council detail page with tabbed interface using Activity component |
| src/pages/Council/CouncilDetail/hooks/useGetCouncilInfo.ts | Hook for fetching council information |
| src/pages/Council/CouncilDetail/components/CouncilNotice.tsx | Updated import path for useCouncilNotice hook |
| src/pages/Council/CouncilDetail/components/CouncilIntro.tsx | Council introduction with contact info and Instagram link parsing |
| src/pages/Club/ClubSearch/index.tsx | New search page with infinite scroll for club search |
| src/pages/Club/ClubList/index.tsx | Club list page with infinite scroll pagination |
| src/pages/Club/ClubList/hooks/useGetClubs.ts | Infinite query hook for fetching clubs with filters |
| src/pages/Club/ClubList/components/SearchBar.tsx | Reusable search bar with button and form modes |
| src/pages/Club/ClubList/components/ClubCard.tsx | Card component for displaying club information |
| src/pages/Club/ClubDetail/index.tsx | Moved null check before tab configuration for better flow |
| src/pages/Club/ClubDetail/hooks/useGetClubRecruitment.ts | Hook for fetching club recruitment details |
| src/pages/Club/ClubDetail/hooks/useGetClubMembers.ts | Hook for fetching club member list |
| src/pages/Club/ClubDetail/hooks/useGetClubDetail.ts | Hook for fetching club details |
| src/pages/Club/ClubDetail/hooks/useCouncilNotices.ts | Hook for fetching council notices with infinite scroll |
| src/pages/Club/ClubDetail/components/ClubRecruitment.tsx | Component for displaying recruitment information |
| src/pages/Club/ClubDetail/components/ClubMember.tsx | Component for displaying club members |
| src/pages/Club/ClubDetail/components/ClubIntro.tsx | Club introduction with inquiry chat functionality |
| src/pages/Club/ClubDetail/components/ClubAccount.tsx | Updated import paths for account-related components |
| src/pages/Club/Application/index.tsx | Application form with dynamic questions and auto-resize textareas |
| src/pages/Club/Application/hooks/useGetClubFee.ts | Hook for fetching club fee information |
| src/pages/Club/Application/hooks/useClubApply.ts | Hook for handling club application with routing logic |
| src/pages/Club/Application/components/AccountInfo.tsx | Component for displaying bank account info with copy functionality |
| src/pages/Club/Application/clubFeePage.tsx | Updated route from 'finish' to 'complete' |
| src/pages/Club/Application/applyCompletePage.tsx | Renamed from ApplyFinishPage to ApplyCompletePage |
| src/pages/Auth/SignUp/hooks/useUniversity.ts | Hook for fetching university list |
| src/pages/Auth/SignUp/hooks/useSignup.ts | Signup mutation hook with error handling |
| src/pages/Auth/SignUp/components/StepLayout.tsx | Reusable layout component for signup steps |
| src/pages/Auth/SignUp/components/AgreementArrow.tsx | Agreement checkbox components for terms |
| src/pages/Auth/SignUp/UniversityStep.tsx | Updated route from 'student-id' to 'studentid' |
| src/pages/Auth/SignUp/TermStep.tsx | Terms agreement step with checkboxes |
| src/pages/Auth/SignUp/StudentIdStep.tsx | Student ID input step with numeric validation |
| src/pages/Auth/SignUp/NameStep.tsx | Name input step with signup submission |
| src/pages/Auth/SignUp/FinishStep.tsx | Updated import path for useMyInfo |
| src/pages/Auth/Login/index.tsx | Login page with OAuth provider buttons |
| src/components/layout/index.tsx | New unified Layout component replacing separate layouts |
| src/components/layout/Header/routeTitles.ts | Route title configuration |
| src/components/layout/Header/index.tsx | Updated import path for useMyInfo |
| src/components/layout/BottomNav/index.tsx | Bottom navigation component |
| src/components/Layout/index.tsx | Removed old Layout components (AppLayout, AuthLayout, HomeLayout) |
| src/apis/chat/index.ts | Normalized API paths by removing leading slashes |
| src/apis/auth/index.ts | Normalized API paths by removing leading slashes |
| src/App.tsx | Updated routes and imports to reflect new structure |
Comments suppressed due to low confidence (1)
src/pages/Club/Application/clubFeePage.tsx:35
- The navigation path has been changed from 'finish' to 'complete', but the corresponding logic in useClubApply hook still navigates to the old 'finish' path. This inconsistency will cause a routing error. Ensure that all references to the old path are updated.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| export const getChatRooms = async () => { | ||
| const response = await apiClient.get<ChatRoomsResponse>('/chats/rooms', { | ||
| const response = await apiClient.get<ChatRoomsResponse>('chats/rooms', { |
Copilot
AI
Dec 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The API paths have been changed to remove the leading slash (e.g., '/chats/rooms' to 'chats/rooms'). While this might work depending on the apiClient implementation, it's inconsistent with standard URL practices where relative paths typically start with a slash. Ensure this change is intentional and that the apiClient correctly handles paths without leading slashes.
| const response = await apiClient.post('users/signup', { | ||
| body: data, | ||
| requiresAuth: true, | ||
| }); | ||
| return response; | ||
| }; | ||
|
|
||
| export const getMyInfo = async () => { | ||
| const response = await apiClient.get<MyInfoResponse>('/users/me', { | ||
| const response = await apiClient.get<MyInfoResponse>('users/me', { | ||
| requiresAuth: true, | ||
| }); | ||
| return response; | ||
| }; | ||
|
|
||
| export const logout = async () => { | ||
| const response = await apiClient.post('/users/logout', { | ||
| const response = await apiClient.post('users/logout', { | ||
| requiresAuth: true, | ||
| }); | ||
| return response; | ||
| }; | ||
|
|
||
| export const putMyInfo = async (data: ModifyMyInfoRequest) => { | ||
| const response = await apiClient.put('/users/me', { | ||
| const response = await apiClient.put('users/me', { | ||
| body: data, | ||
| requiresAuth: true, | ||
| }); | ||
| return response; | ||
| }; | ||
|
|
||
| export const deleteMyAccount = async () => { | ||
| const response = await apiClient.delete('/users/withdraw', { | ||
| const response = await apiClient.delete('users/withdraw', { |
Copilot
AI
Dec 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to the chats endpoints, the API paths have been changed to remove the leading slash. This pattern is repeated across multiple endpoints. Verify that this is intentional and consistent with the apiClient's base URL configuration to avoid broken API calls.
No description provided.