-
Notifications
You must be signed in to change notification settings - Fork 3
[refacotor] Tanstack Query 리팩토링 및 API/Hooks 구조 개선 #1058
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
Merged
seongwon030
merged 19 commits into
develop-fe
from
refactor/#1057-tantack-refactoring-MOA-532
Jan 18, 2026
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
b492e2e
refactor: hooks 폴더 구조를 도메인별로 재구성
seongwon030 0ba9f4d
refactor: API 폴더 구조 개선 및 공통 에러 처리 로직 분리 - 24개 API 파일을 5개 도메인별 파일로 통합…
seongwon030 ee5d022
refactor: API 에러 메시지 개선 및 React Query keys 상수화
seongwon030 9600417
refactor: 안 쓰는 코드 제거
seongwon030 aab1f70
refactor: API 응답 처리 안정성 강화 및 데이터 유효성 검사 추가
seongwon030 7cbc546
refactor: 주석제거
seongwon030 bb81cd2
refactor: React Query 설정 전역화 및 에러 핸들링 로직 UI 위임
seongwon030 b92aa08
refactor: 지원서 관리 및 상세 페이지 로직 개선 및 훅 분리
seongwon030 c4a2c2d
refactor: constants 파일명을 camelCase로 통일
seongwon030 3074652
refactor: prettier적용
seongwon030 cf4e6a8
fix: useGetApplication 캐시 키 충돌 방지
seongwon030 3099a99
fix: ClubDetailPage 에러 체크 순서 수정
seongwon030 dfe4b64
refactor: ClubSearchResponse 타입을 club.ts로 통합
seongwon030 6ae9a31
refactor: usePhotoModal 훅 제거 및 로직 인라인화
seongwon030 91eac2f
fix: ClubFeed 피드 변경 시 index 범위 보장 처리 추가
seongwon030 7396eb8
refactor: PhotoLayout제거
seongwon030 146de1b
refactor: scrollSection 제거
seongwon030 390618d
refactor: netlify 설정파일제거
seongwon030 4636956
refactor: useGetApplicationList로 변경
seongwon030 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| import API_BASE_URL from '@/constants/api'; | ||
| import { secureFetch } from './auth/secureFetch'; | ||
| import { handleResponse, withErrorHandling } from './utils/apiHelpers'; | ||
|
|
||
| export const getClubApplicants = async (applicationFormId: string) => { | ||
| return withErrorHandling(async () => { | ||
| const response = await secureFetch( | ||
| `${API_BASE_URL}/api/club/apply/info/${applicationFormId}`, | ||
| ); | ||
| return handleResponse(response, '지원자 목록을 불러오는데 실패했습니다.'); | ||
| }, 'Error fetching club applicants'); | ||
| }; | ||
|
|
||
| export const deleteApplicants = async ( | ||
| applicantIds: string[], | ||
| applicationFormId: string, | ||
| ) => { | ||
| return withErrorHandling(async () => { | ||
| const response = await secureFetch( | ||
| `${API_BASE_URL}/api/club/applicant/${applicationFormId}`, | ||
| { | ||
| method: 'DELETE', | ||
| headers: { | ||
| 'Content-Type': 'application/json', | ||
| }, | ||
| body: JSON.stringify({ applicantIds: applicantIds }), | ||
| }, | ||
| ); | ||
| return handleResponse(response, '지원자 삭제에 실패했습니다.'); | ||
| }, 'Error fetching delete applicants'); | ||
| }; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
수정이나 삭제 요청은 왜 재시도 하지 않도록 설정하는건가요?
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.
서버에서 성공했어도 네트워크 에러가 떠서 클라이언트가 응답을 못 받았다고 헀을 때 재시도한다면, 서버에서 이미 삭제되었으니 에러를 내뱉을 거에요.
여기서 만약 클라이언트가 에러처리를 했어도 재시도를 설정한다면 어떤 요청에서 에러가 떴는지 알기가 힘들 것 같아요.
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.
그렇군요!