Skip to content

Commit bcc00fc

Browse files
committed
fix: 사용하지 않는 컴포넌트 및 import 제거
1 parent 18164cc commit bcc00fc

File tree

19 files changed

+127
-131
lines changed

19 files changed

+127
-131
lines changed

src/app/(auth)/social-callback/page.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,6 @@ export default function SocialCallbackPage() {
8686
}, [searchParams, router, refreshUser]);
8787

8888
const handleSignUpSuccess = async (userId: number) => {
89-
console.log("소셜 회원가입 성공:", userId);
90-
9189
// 회원가입 후 자동 로그인 (백엔드에서 JWT 발급 필요)
9290
await refreshUser();
9391

src/app/(main)/auction-history/page.tsx

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -57,33 +57,36 @@ export default function Page() {
5757

5858
const totalElements = data?.pages[0]?.meta.totalElements ?? 0;
5959

60-
const findCategoryPath = (
61-
categories: ItemCategory[],
62-
targetId: string,
63-
currentPath: ItemCategory[] = [],
64-
): ItemCategory[] => {
65-
for (const category of categories) {
66-
const newPath = [...currentPath, category];
67-
if (category.id === targetId) {
68-
return newPath;
69-
}
70-
if (category.children) {
71-
const foundPath = findCategoryPath(
72-
category.children,
73-
targetId,
74-
newPath,
75-
);
76-
if (foundPath.length > 0) {
77-
return foundPath;
60+
const findCategoryPath = useCallback(
61+
(
62+
categories: ItemCategory[],
63+
targetId: string,
64+
currentPath: ItemCategory[] = [],
65+
): ItemCategory[] => {
66+
for (const category of categories) {
67+
const newPath = [...currentPath, category];
68+
if (category.id === targetId) {
69+
return newPath;
70+
}
71+
if (category.children) {
72+
const foundPath = findCategoryPath(
73+
category.children,
74+
targetId,
75+
newPath,
76+
);
77+
if (foundPath.length > 0) {
78+
return foundPath;
79+
}
7880
}
7981
}
80-
}
81-
return [];
82-
};
82+
return [];
83+
},
84+
[],
85+
);
8386

8487
const categoryPath = useMemo(
8588
() => findCategoryPath(categories, selectedCategory),
86-
[selectedCategory, categories],
89+
[selectedCategory, categories, findCategoryPath],
8790
);
8891

8992
useEffect(() => {
@@ -231,7 +234,6 @@ export default function Page() {
231234
params.itemOptionSearchRequest = {};
232235

233236
filters.forEach((filter) => {
234-
const conditionKeys = Object.keys(filter.searchCondition);
235237
Object.entries(filter.values).forEach(([key, value]) => {
236238
if (value === undefined || value === "") return;
237239

src/app/(main)/mypage/page.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,13 +226,13 @@ export default function MyPage() {
226226
icon={<Key className="w-5 h-5" />}
227227
label="비밀번호 변경"
228228
description="정기적인 비밀번호 변경으로 계정을 안전하게 보호하세요"
229-
onClick={() => console.log("비밀번호 변경")}
229+
onClick={() => {}}
230230
/>
231231
<ActionButton
232232
icon={<Shield className="w-5 h-5" />}
233233
label="2단계 인증"
234234
description="추가 보안 계층으로 계정을 보호하세요"
235-
onClick={() => console.log("2단계 인증")}
235+
onClick={() => {}}
236236
badge="준비중"
237237
/>
238238
</div>
@@ -247,7 +247,7 @@ export default function MyPage() {
247247
<Button
248248
variant="outline"
249249
className="border-red-300 text-red-700 hover:bg-red-100 rounded-xl"
250-
onClick={() => console.log("계정 삭제")}
250+
onClick={() => {}}
251251
>
252252
계정 삭제
253253
</Button>
@@ -337,7 +337,6 @@ function EditProfileModal({
337337

338338
const handleSave = () => {
339339
// TODO: API 호출
340-
console.log("저장:", { nickname, email });
341340
onClose();
342341
};
343342

src/app/api/auction-history/search/route.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { NextRequest, NextResponse } from "next/server";
2-
import { AuctionHistorySearchParams } from "@/types/auction-history";
32

43
interface ItemOption {
54
id: string;

src/app/api/auth/check-email/route.ts

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,26 @@ export async function GET(request: NextRequest) {
2424
);
2525

2626
return NextResponse.json(response.data);
27-
} catch (error: any) {
27+
} catch (error: unknown) {
2828
console.error("이메일 중복 체크 API 에러:", error);
2929

3030
// 에러 응답 상세 로깅
31-
if (error.response) {
32-
console.error("에러 상태:", error.response.status);
33-
console.error("에러 데이터:", error.response.data);
34-
console.error("에러 헤더:", error.response.headers);
35-
console.error("요청 URL:", error.config?.baseURL + error.config?.url);
31+
if (error && typeof error === "object" && "response" in error) {
32+
const axiosError = error as { response?: { status: number; data?: { message?: string }; headers?: unknown }; config?: { baseURL?: string; url?: string } };
33+
if (axiosError.response) {
34+
console.error("에러 상태:", axiosError.response.status);
35+
console.error("에러 데이터:", axiosError.response.data);
36+
console.error("에러 헤더:", axiosError.response.headers);
37+
console.error("요청 URL:", axiosError.config?.baseURL + axiosError.config?.url);
3638

37-
return NextResponse.json(
38-
{
39-
success: false,
40-
message: error.response.data?.message || "이메일 확인에 실패했습니다",
41-
},
42-
{ status: error.response.status }
43-
);
39+
return NextResponse.json(
40+
{
41+
success: false,
42+
message: axiosError.response.data?.message || "이메일 확인에 실패했습니다",
43+
},
44+
{ status: axiosError.response.status }
45+
);
46+
}
4447
}
4548

4649
return NextResponse.json(

src/app/api/auth/check-nickname/route.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,20 @@ export async function GET(request: NextRequest) {
2424
);
2525

2626
return NextResponse.json(response.data);
27-
} catch (error: any) {
27+
} catch (error: unknown) {
2828
console.error("닉네임 중복 체크 API 에러:", error);
2929

30-
if (error.response) {
31-
return NextResponse.json(
32-
{
33-
success: false,
34-
message: error.response.data?.message || "닉네임 확인에 실패했습니다",
35-
},
36-
{ status: error.response.status }
37-
);
30+
if (error && typeof error === "object" && "response" in error) {
31+
const axiosError = error as { response?: { status: number; data?: { message?: string } } };
32+
if (axiosError.response) {
33+
return NextResponse.json(
34+
{
35+
success: false,
36+
message: axiosError.response.data?.message || "닉네임 확인에 실패했습니다",
37+
},
38+
{ status: axiosError.response.status }
39+
);
40+
}
3841
}
3942

4043
return NextResponse.json(

src/app/api/auth/login/route.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,21 @@ export async function POST(request: NextRequest) {
3030
}
3131

3232
return nextResponse;
33-
} catch (error: any) {
33+
} catch (error: unknown) {
3434
console.error("로그인 API 에러:", error);
3535

3636
// Axios 에러인 경우
37-
if (error.response) {
38-
return NextResponse.json(
39-
{
40-
success: false,
41-
message: error.response.data?.message || "로그인에 실패했습니다",
42-
},
43-
{ status: error.response.status }
44-
);
37+
if (error && typeof error === "object" && "response" in error) {
38+
const axiosError = error as { response?: { status: number; data?: { message?: string } } };
39+
if (axiosError.response) {
40+
return NextResponse.json(
41+
{
42+
success: false,
43+
message: axiosError.response.data?.message || "로그인에 실패했습니다",
44+
},
45+
{ status: axiosError.response.status }
46+
);
47+
}
4548
}
4649

4750
// 일반 에러

src/app/api/auth/logout/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { NextRequest, NextResponse } from "next/server";
1+
import { NextResponse } from "next/server";
22

3-
export async function POST(request: NextRequest) {
3+
export async function POST() {
44
try {
55
// 쿠키 삭제
66
const response = NextResponse.json({

src/app/api/auth/me/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export async function GET(request: NextRequest) {
3434
profileImageUrl: null,
3535
},
3636
});
37-
} catch (decodeError) {
37+
} catch {
3838
return NextResponse.json(
3939
{
4040
success: false,

src/app/api/auth/signup/route.ts

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,22 @@ export async function POST(request: NextRequest) {
1616
});
1717

1818
return NextResponse.json(response.data);
19-
} catch (error: any) {
19+
} catch (error: unknown) {
2020
console.error("회원가입 API 에러:", error);
2121

2222
// Axios 에러인 경우
23-
if (error.response) {
24-
return NextResponse.json(
25-
{
26-
success: false,
27-
message: error.response.data?.message || "회원가입에 실패했습니다",
28-
code: error.response.data?.code || "SIGNUP_FAILED",
29-
},
30-
{ status: error.response.status }
31-
);
23+
if (error && typeof error === "object" && "response" in error) {
24+
const axiosError = error as { response?: { status: number; data?: { message?: string; code?: string } } };
25+
if (axiosError.response) {
26+
return NextResponse.json(
27+
{
28+
success: false,
29+
message: axiosError.response.data?.message || "회원가입에 실패했습니다",
30+
code: axiosError.response.data?.code || "SIGNUP_FAILED",
31+
},
32+
{ status: axiosError.response.status }
33+
);
34+
}
3235
}
3336

3437
// 일반 에러

0 commit comments

Comments
 (0)