Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
b492e2e
refactor: hooks 폴더 구조를 도메인별로 재구성
seongwon030 Jan 17, 2026
0ba9f4d
refactor: API 폴더 구조 개선 및 공통 에러 처리 로직 분리 - 24개 API 파일을 5개 도메인별 파일로 통합…
seongwon030 Jan 17, 2026
ee5d022
refactor: API 에러 메시지 개선 및 React Query keys 상수화
seongwon030 Jan 17, 2026
9600417
refactor: 안 쓰는 코드 제거
seongwon030 Jan 17, 2026
aab1f70
refactor: API 응답 처리 안정성 강화 및 데이터 유효성 검사 추가
seongwon030 Jan 17, 2026
7cbc546
refactor: 주석제거
seongwon030 Jan 17, 2026
bb81cd2
refactor: React Query 설정 전역화 및 에러 핸들링 로직 UI 위임
seongwon030 Jan 17, 2026
b92aa08
refactor: 지원서 관리 및 상세 페이지 로직 개선 및 훅 분리
seongwon030 Jan 17, 2026
c4a2c2d
refactor: constants 파일명을 camelCase로 통일
seongwon030 Jan 17, 2026
3074652
refactor: prettier적용
seongwon030 Jan 17, 2026
cf4e6a8
fix: useGetApplication 캐시 키 충돌 방지
seongwon030 Jan 17, 2026
3099a99
fix: ClubDetailPage 에러 체크 순서 수정
seongwon030 Jan 17, 2026
dfe4b64
refactor: ClubSearchResponse 타입을 club.ts로 통합
seongwon030 Jan 17, 2026
6ae9a31
refactor: usePhotoModal 훅 제거 및 로직 인라인화
seongwon030 Jan 17, 2026
91eac2f
fix: ClubFeed 피드 변경 시 index 범위 보장 처리 추가
seongwon030 Jan 17, 2026
7396eb8
refactor: PhotoLayout제거
seongwon030 Jan 17, 2026
146de1b
refactor: scrollSection 제거
seongwon030 Jan 17, 2026
390618d
refactor: netlify 설정파일제거
seongwon030 Jan 17, 2026
4636956
refactor: useGetApplicationList로 변경
seongwon030 Jan 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions frontend/.prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,7 @@
"jsxSingleQuote": true,
"useTabs": false,
"endOfLine": "auto",
"plugins": [
"@ianvs/prettier-plugin-sort-imports"
],
"importOrder": [
"^react",
"<THIRD_PARTY_MODULES>",
"^@/",
"^[./]"
],
"plugins": ["@ianvs/prettier-plugin-sort-imports"],
"importOrder": ["^react", "<THIRD_PARTY_MODULES>", "^@/", "^[./]"],
"importOrderSortSpecifiers": true
}
}
2 changes: 1 addition & 1 deletion frontend/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Preview } from '@storybook/react';
import { useEffect } from 'react';
import type { Preview } from '@storybook/react';

const preview: Preview = {
decorators: [
Expand Down
56 changes: 27 additions & 29 deletions frontend/config/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,55 +1,53 @@
import react from '@vitejs/plugin-react';
import { visualizer } from 'rollup-plugin-visualizer';
import { defineConfig } from 'vite';
import tsconfigPaths from 'vite-tsconfig-paths';
import { visualizer } from 'rollup-plugin-visualizer';

const DEFAULT_PORT = 3000;

export default defineConfig({
plugins: [
react(),
tsconfigPaths(),
],
plugins: [react(), tsconfigPaths()],
build: {
rollupOptions: {
output: {
manualChunks(id) {
if (!id.includes("node_modules")) return;
if (!id.includes('node_modules')) return;

if (id.includes("react-router")) return "router";
if (id.includes("react-datepicker")) return "dates";
if (id.includes('react-router')) return 'router';
if (id.includes('react-datepicker')) return 'dates';
if (
id.includes("react-markdown") ||
id.includes("remark") ||
id.includes("rehype") ||
id.includes("unified") ||
id.includes("micromark") ||
id.includes("mdast") ||
id.includes("hast") ||
id.includes("parse5")
id.includes('react-markdown') ||
id.includes('remark') ||
id.includes('rehype') ||
id.includes('unified') ||
id.includes('micromark') ||
id.includes('mdast') ||
id.includes('hast') ||
id.includes('parse5')
) {
return "markdown";
return 'markdown';
}

if (
id.includes("node_modules/react/") ||
id.includes("node_modules/react-dom/") ||
id.includes("scheduler")
id.includes('node_modules/react/') ||
id.includes('node_modules/react-dom/') ||
id.includes('scheduler')
) {
return "react-vendor";
return 'react-vendor';
}

if (id.includes("zustand")) return "state";
if (id.includes("@tanstack/react-query")) return "react-query";
if (id.includes('zustand')) return 'state';
if (id.includes('@tanstack/react-query')) return 'react-query';

if (id.includes("mixpanel-browser")) return "analytics";
if (id.includes("@sentry")) return "sentry";
if (id.includes('mixpanel-browser')) return 'analytics';
if (id.includes('@sentry')) return 'sentry';

if (id.includes("framer-motion") || id.includes("motion-dom")) return "motion";
if (id.includes("swiper")) return "swiper";
if (id.includes("date-fns")) return "dates";
if (id.includes('framer-motion') || id.includes('motion-dom'))
return 'motion';
if (id.includes('swiper')) return 'swiper';
if (id.includes('date-fns')) return 'dates';

return "vendor";
return 'vendor';
},
},
},
Expand Down
4 changes: 0 additions & 4 deletions frontend/netlify.toml

This file was deleted.

14 changes: 12 additions & 2 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { ThemeProvider } from 'styled-components';
import { ScrollToTopButton } from '@/components/common/ScrollToTopButton/ScrollToTopButton';
import { AdminClubProvider } from '@/context/AdminClubContext';
import { ScrollToTop } from '@/hooks/ScrollToTop';
import { ScrollToTop } from '@/hooks/Scroll/ScrollToTop';
import LoginTab from '@/pages/AdminPage/auth/LoginTab/LoginTab';
import PrivateRoute from '@/pages/AdminPage/auth/PrivateRoute/PrivateRoute';
import ClubDetailPage from '@/pages/ClubDetailPage/ClubDetailPage';
Expand All @@ -16,7 +16,17 @@ import ClubUnionPage from './pages/ClubUnionPage/ClubUnionPage';
import IntroducePage from './pages/IntroducePage/IntroducePage';
import 'swiper/css';

const queryClient = new QueryClient();
const queryClient = new QueryClient({
defaultOptions: {
queries: {
staleTime: 60 * 1000,
retry: 1,
},
mutations: {
retry: 0,
},
Comment on lines +19 to +27
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수정이나 삭제 요청은 왜 재시도 하지 않도록 설정하는건가요?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

서버에서 성공했어도 네트워크 에러가 떠서 클라이언트가 응답을 못 받았다고 헀을 때 재시도한다면, 서버에서 이미 삭제되었으니 에러를 내뱉을 거에요.

여기서 만약 클라이언트가 에러처리를 했어도 재시도를 설정한다면 어떤 요청에서 에러가 떴는지 알기가 힘들 것 같아요.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그렇군요!

},
});

const AdminRoutes = lazy(() => import('@/pages/AdminPage/AdminRoutes'));

Expand Down
31 changes: 31 additions & 0 deletions frontend/src/apis/applicants.ts
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');
};
32 changes: 0 additions & 32 deletions frontend/src/apis/applicants/deleteApplicants.ts

This file was deleted.

22 changes: 0 additions & 22 deletions frontend/src/apis/applicants/getClubApplicants.ts

This file was deleted.

Loading