Skip to content

Commit 1d5d444

Browse files
authored
Merge pull request #172 from Central-MakeUs/171-refactor-overall-improvement
[REFACTOR]: 불필요한 파일 제거 및 라우팅 구조 개선 및 폴더 구조 개선 및 스타일 중복 커스텀
2 parents d7800eb + d30bfc7 commit 1d5d444

File tree

101 files changed

+513
-540
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+513
-540
lines changed

web/package-lock.json

Lines changed: 1 addition & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
"@tanstack/react-query": "^5.81.2",
1616
"@webview-bridge/web": "^1.7.8",
1717
"axios": "^1.10.0",
18+
"clsx": "^2.1.1",
1819
"motion": "^12.18.1",
1920
"prettier": "^3.6.0",
2021
"prettier-plugin-tailwindcss": "^0.6.13",
2122
"react": "^19.1.0",
2223
"react-dom": "^19.1.0",
2324
"react-intersection-observer": "^9.16.0",
2425
"react-router-dom": "^7.6.2",
25-
"react-toastify": "^11.0.5",
2626
"tailwind-merge": "^3.3.1",
2727
"tailwindcss": "^4.1.10",
2828
"vite-plugin-svgr": "^4.3.0",

web/src/App.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { RouterProvider } from "react-router-dom";
22

33
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
4-
import { toast } from "react-toastify";
54

65
import AppRouter from "@/routes/AppRouter";
76

@@ -12,9 +11,7 @@ const queryClient = new QueryClient({
1211
throwOnError: false,
1312
},
1413
mutations: {
15-
onError: (error) => {
16-
toast.error(error.message);
17-
},
14+
throwOnError: false,
1815
},
1916
},
2017
});

web/src/apis/analyze/getAnalyzeResult.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { authAPI } from "@/apis/instance";
22
import type { DetectionType } from "@/types/my/my.types";
3-
import { generateApiPath } from "@/utils/generateApiPath";
3+
import { generatePath } from "@/utils/generatePath";
44

55
import type {
66
ANALYSIS_CATEGORY,
@@ -25,7 +25,7 @@ export const getAnalyzeResult = async ({
2525
detectionId: number;
2626
}): Promise<GetAnalyzeResultResponse> => {
2727
const response = await authAPI.get(
28-
generateApiPath(API_DOMAINS.GET_ANALYZE_RESULT, { detectionId }),
28+
generatePath(API_DOMAINS.GET_ANALYZE_RESULT, { detectionId }),
2929
);
3030
return response.data;
3131
};

web/src/apis/comment/deleteComment.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { authAPI } from "@/apis/instance";
2-
import { generateApiPath } from "@/utils/generateApiPath";
2+
import { generatePath } from "@/utils/generatePath";
33

44
import { API_DOMAINS } from "@/constants/apiConstants";
55

66
export const deleteComment = async ({ commentId }: { commentId: number }) => {
77
const response = await authAPI.delete(
8-
generateApiPath(API_DOMAINS.DELETE_COMMENT, { commentId }),
8+
generatePath(API_DOMAINS.DELETE_COMMENT, { commentId }),
99
);
1010

1111
return response.data;

web/src/apis/comment/getCommentList.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { authAPI } from "@/apis/instance";
2-
import { generateApiPath } from "@/utils/generateApiPath";
2+
import { generatePath } from "@/utils/generatePath";
33

44
import { API_DOMAINS } from "@/constants/apiConstants";
55

66
export const getCommentList = async ({ postId }: { postId: number }) => {
77
const response = await authAPI.get(
8-
generateApiPath(API_DOMAINS.GET_COMMENT_LIST, { postId }),
8+
generatePath(API_DOMAINS.GET_COMMENT_LIST, { postId }),
99
);
1010

1111
return response.data;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { authAPI } from "@/apis/instance";
2-
import { generateApiPath } from "@/utils/generateApiPath";
2+
import { generatePath } from "@/utils/generatePath";
33

44
import { API_DOMAINS } from "@/constants/apiConstants";
55

66
export const deletePost = async ({ postId }: { postId: number }) => {
77
const response = await authAPI.delete(
8-
generateApiPath(API_DOMAINS.DELETE_COMMUNITY_POST, { postId }),
8+
generatePath(API_DOMAINS.DELETE_COMMUNITY_POST, { postId }),
99
);
1010
return response.data;
1111
};

web/src/apis/community/getCommunityDetail.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { authAPI } from "@/apis/instance";
22
import type { PostStatus } from "@/types/community/community.types";
3-
import { generateApiPath } from "@/utils/generateApiPath";
3+
import { generatePath } from "@/utils/generatePath";
44

55
import { API_DOMAINS } from "@/constants/apiConstants";
66

@@ -25,7 +25,7 @@ export const getCommunityDetail = async ({
2525
postId: number;
2626
}): Promise<PostDetailResponse> => {
2727
const response = await authAPI.get(
28-
generateApiPath(API_DOMAINS.GET_COMMUNITY_DETAIL, { postId }),
28+
generatePath(API_DOMAINS.GET_COMMUNITY_DETAIL, { postId }),
2929
);
3030
return response.data;
3131
};

web/src/apis/community/postBlock.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { authAPI } from "@/apis/instance";
2-
import { generateApiPath } from "@/utils/generateApiPath";
2+
import { generatePath } from "@/utils/generatePath";
33

44
import { API_DOMAINS } from "@/constants/apiConstants";
55

66
export const postBlock = async ({ postId }: { postId: number }) => {
77
const response = await authAPI.post(
8-
generateApiPath(API_DOMAINS.POST_BLOCK, { postId }),
8+
generatePath(API_DOMAINS.POST_BLOCK, { postId }),
99
{ reason: "HATE" },
1010
);
1111
return response.data;

web/src/apis/community/postReport.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { authAPI } from "@/apis/instance";
2-
import { generateApiPath } from "@/utils/generateApiPath";
2+
import { generatePath } from "@/utils/generatePath";
33

44
import { API_DOMAINS } from "@/constants/apiConstants";
55
import type { ReportType } from "@/constants/reportReasons";
@@ -12,7 +12,7 @@ export const postReport = async ({
1212
postId: number;
1313
}) => {
1414
const response = await authAPI.post(
15-
generateApiPath(API_DOMAINS.POST_REPORT, { postId }),
15+
generatePath(API_DOMAINS.POST_REPORT, { postId }),
1616
{ reasonCode },
1717
);
1818
return response.data;

0 commit comments

Comments
 (0)