Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions apps/web/biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"noNonNullAssertion": "off"
},
"suspicious": {
"noConsole": "error",
"noExplicitAny": "error",
"noUnknownAtRules": "off",
"useIterableCallbackReturn": "off"
Expand Down
1 change: 0 additions & 1 deletion apps/web/src/apis/Auth/postEmailVerification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const usePostEmailSignUp = () => {
return useMutation<EmailSignUpResponse, AxiosError, EmailSignUpRequest>({
mutationFn: (data) => authApi.postEmailSignUp(data),
onError: (error) => {
console.error("이메일 회원가입 실패:", error);
toast.error("회원가입에 실패했습니다.");
},
});
Expand Down
1 change: 0 additions & 1 deletion apps/web/src/apis/Auth/postSignUp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const usePostSignUp = () => {
return useMutation<SignUpResponse, AxiosError, SignUpRequest>({
mutationFn: (data) => authApi.postSignUp(data),
onError: (error) => {
console.error("회원가입 실패:", error);
toast.error("회원가입에 실패했습니다.");
},
});
Expand Down
1 change: 0 additions & 1 deletion apps/web/src/apis/Scores/postCreateGpa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export const usePostGpaScore = () => {
},

onError: (error) => {
console.error("학점 제출 중 오류 발생:", error);
toast.error("오류가 발생했습니다. 다시 시도해주세요.");
},
});
Expand Down
1 change: 0 additions & 1 deletion apps/web/src/apis/Scores/postCreateLanguageTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export const usePostLanguageTestScore = () => {
},

onError: (error) => {
console.error("어학 성적 제출 중 오류 발생:", error);
toast.error("오류가 발생했습니다. 다시 시도해주세요.");
},
});
Expand Down
4 changes: 1 addition & 3 deletions apps/web/src/apis/chat/putReadChatRoom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ const usePutChatRead = () => {
// 채팅방 목록 쿼리를 무효화하여 새로 고침
queryClient.invalidateQueries({ queryKey: [ChatQueryKeys.chatRooms] });
},
onError: (error) => {
console.error("채팅방 진입 읽기 실패", error);
},
onError: (error) => {},
});
};

Expand Down
1 change: 0 additions & 1 deletion apps/web/src/apis/community/deleteComment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const useDeleteComment = () => {
toast.success("댓글이 삭제되었습니다.");
},
onError: (error) => {
console.error("댓글 삭제 실패:", error);
toast.error("댓글 삭제에 실패했습니다.");
},
});
Expand Down
1 change: 0 additions & 1 deletion apps/web/src/apis/community/deleteLikePost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const useDeleteLike = () => {
queryClient.invalidateQueries({ queryKey: [CommunityQueryKeys.posts, postId] });
},
onError: (error) => {
console.error("게시글 좋아요 취소 실패:", error);
toast.error("좋아요 취소 처리에 실패했습니다.");
},
});
Expand Down
6 changes: 1 addition & 5 deletions apps/web/src/apis/community/deletePost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ interface DeletePostVariables {
const revalidateCommunityPage = async (boardCode: string, accessToken: string) => {
try {
if (!accessToken) {
console.warn("Revalidation skipped: No access token available");
return;
}

Expand All @@ -32,9 +31,7 @@ const revalidateCommunityPage = async (boardCode: string, accessToken: string) =
},
body: JSON.stringify({ boardCode }),
});
} catch (error) {
console.error("Revalidate failed:", error);
}
} catch (error) {}
};

/**
Expand Down Expand Up @@ -63,7 +60,6 @@ const useDeletePost = () => {
router.replace(`/community/${variables.boardCode || "FREE"}`);
},
onError: (error) => {
console.error("게시글 삭제 실패:", error);
toast.error("게시글 삭제에 실패했습니다. 잠시 후 다시 시도해주세요.");
},
});
Expand Down
6 changes: 1 addition & 5 deletions apps/web/src/apis/community/patchUpdatePost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ interface UpdatePostVariables {
const revalidateCommunityPage = async (boardCode: string, accessToken: string) => {
try {
if (!accessToken) {
console.warn("Revalidation skipped: No access token available");
return;
}

Expand All @@ -31,9 +30,7 @@ const revalidateCommunityPage = async (boardCode: string, accessToken: string) =
},
body: JSON.stringify({ boardCode }),
});
} catch (error) {
console.error("Revalidate failed:", error);
}
} catch (error) {}
};

/**
Expand All @@ -58,7 +55,6 @@ const useUpdatePost = () => {
toast.success("게시글이 수정되었습니다.");
},
onError: (error) => {
console.error("게시글 수정 실패:", error);
toast.error("게시글 수정에 실패했습니다.");
},
});
Expand Down
1 change: 0 additions & 1 deletion apps/web/src/apis/community/postCreateComment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const useCreateComment = () => {
toast.success("댓글이 등록되었습니다.");
},
onError: (error) => {
console.error("댓글 생성 실패:", error);
toast.error("댓글 등록에 실패했습니다.");
},
});
Expand Down
6 changes: 1 addition & 5 deletions apps/web/src/apis/community/postCreatePost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { CommunityQueryKeys, communityApi, type PostCreateRequest, type PostIdRe
const revalidateCommunityPage = async (boardCode: string, accessToken: string) => {
try {
if (!accessToken) {
console.warn("Revalidation skipped: No access token available");
return;
}

Expand All @@ -25,9 +24,7 @@ const revalidateCommunityPage = async (boardCode: string, accessToken: string) =
},
body: JSON.stringify({ boardCode }),
});
} catch (error) {
console.error("Revalidate failed:", error);
}
} catch (error) {}
};

/**
Expand All @@ -51,7 +48,6 @@ const useCreatePost = () => {
toast.success("게시글이 등록되었습니다.");
},
onError: (error) => {
console.error("게시글 생성 실패:", error);
toast.error("게시글 등록에 실패했습니다.");
},
});
Expand Down
1 change: 0 additions & 1 deletion apps/web/src/apis/community/postLikePost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const usePostLike = () => {
queryClient.invalidateQueries({ queryKey: [CommunityQueryKeys.posts, postId] });
},
onError: (error) => {
console.error("게시글 좋아요 실패:", error);
toast.error("좋아요 처리에 실패했습니다.");
},
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const useUploadProfileImagePublic = () => {
return useMutation<FileResponse, AxiosError, File>({
mutationFn: imageUploadApi.postUploadProfileImageBeforeSignup,
onError: (error) => {
console.error("프로필 이미지 업로드 실패:", error);
toast.error("이미지 업로드에 실패했습니다.");
},
});
Expand Down
1 change: 0 additions & 1 deletion apps/web/src/apis/news/deleteNews.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ const useDeleteArticle = (userId: number | null) => {
queryClient.setQueryData<Article[]>(queryKey, context.previousArticleList);
}
toast.error("아티클 삭제에 실패했습니다. 다시 시도해주세요.");
console.error("Failed to delete article:", error);
},

onSettled: () => {
Expand Down
1 change: 0 additions & 1 deletion apps/web/src/apis/news/server/getNewsList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export const getHomeNewsList = async (): Promise<News[]> => {
const response = await serverFetch<ArticleListResponse>("/news");

if (!response.ok) {
console.error("Failed to fetch home news list:", response.error);
return [];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const getRecommendedUniversity = async () => {
const res = await serverFetch<GetRecommendedUniversityResponse>(endpoint);

if (!res.ok) {
console.error(`Failed to fetch recommended universities:`, res.error);
}

return res;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ export const getSearchUniversitiesByFilter = async (
const response = await serverFetch<UniversitySearchResponse>(endpoint);

if (!response.ok) {
console.error(`Failed to search universities by filter:`, response.error);
return [];
}

Expand All @@ -52,7 +51,6 @@ export const getSearchUniversitiesAllRegions = async (): Promise<ListUniversity[
const response = await serverFetch<UniversitySearchResponse>(endpoint);

if (!response.ok) {
console.error(`Failed to fetch all regions universities:`, response.error);
return [];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export const getUniversitiesByText = async (value: string): Promise<ListUniversi
const response = await serverFetch<UniversitySearchResponse>(endpoint);

if (!response.ok) {
console.error(`Failed to search universities by text (value: "${value}"):`, response.error);
return [];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export const getUniversityDetailWithStatus = async (
const result = await serverFetch<University>(`/univ-apply-infos/${universityInfoForApplyId}`);

if (!result.ok) {
console.error(`Failed to fetch university detail (ID: ${universityInfoForApplyId}):`, result.error);
return {
ok: false,
status: result.status,
Expand Down
2 changes: 0 additions & 2 deletions apps/web/src/app/api/revalidate/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ async function POST(request: NextRequest) {
return NextResponse.json({ revalidated: false, message: "Forbidden" }, { status: 403 });
}
} catch (error) {
console.error("Token verification failed:", error);
return NextResponse.json({ revalidated: false, message: "Forbidden" }, { status: 403 });
}

Expand Down Expand Up @@ -89,7 +88,6 @@ async function POST(request: NextRequest) {

return NextResponse.json({ revalidated: false, message: "Missing path, tag, or boardCode" }, { status: 400 });
} catch (error) {
console.error("Revalidate error:", error);
return NextResponse.json({ revalidated: false, message: "Error revalidating" }, { status: 500 });
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ const KebabMenu = ({ postId, boardCode, isOwner = false, authorId }: KebabMenuPr
await navigator.clipboard.writeText(url);
toast.success("URL이 복사되었습니다.");
} catch (err) {
console.error("Failed to copy URL:", err);
toast.error("URL 복사에 실패했습니다.");
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ const useChatListHandler = (chatId: number) => {
body: JSON.stringify({ content, senderId }),
});
} else {
console.error("WebSocket is not connected. Message could not be sent.");
// 여기에 메시지 전송 실패에 대한 UI 피드백 로직을 추가할 수 있습니다. (e.g., alert, toast)
}
},
Expand All @@ -100,7 +99,6 @@ const useChatListHandler = (chatId: number) => {
return true;
}

console.error("WebSocket is not connected. Image message could not be sent.");
return false;
},
[chatId, connectionStatus],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export const formatDateSeparator = (dateString: string) => {

// Invalid date 체크
if (Number.isNaN(date.getTime())) {
console.error("Invalid date string:", dateString);
return "";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ const LanguageTestSubmitForm = () => {
setSubmittedData(data);
} catch (error) {
// 실패 시 처리 (알림, 로그 등)
console.error("어학 성적 제출 실패:", error);
toast.error("제출에 실패했습니다. 다시 시도해주세요.");
}
};
Expand Down
4 changes: 1 addition & 3 deletions apps/web/src/components/layout/ReissueProvider/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ const ReissueProvider: React.FC<ReissueProviderProps> = ({ children }) => {
useAuthStore.getState().setLoading(false);
}
}
} catch (error) {
console.error("Error initializing auth:", error);
}
} catch (error) {}
};

initializeAuth();
Expand Down
4 changes: 0 additions & 4 deletions apps/web/src/components/login/signup/SignupSurvey.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ const SignupSurvey = ({ baseNickname, baseEmail, baseProfileImageUrl }: SignupSu
imageUrl = result.fileUrl;
} catch (err: unknown) {
const error = err as { message?: string };
console.error("Error", error.message);
// toast.error는 hook의 onError에서 이미 처리되므로 중복 호출 제거
}
}
Expand Down Expand Up @@ -96,17 +95,14 @@ const SignupSurvey = ({ baseNickname, baseEmail, baseProfileImageUrl }: SignupSu
message?: string;
};
if (axiosError.response) {
console.error("Axios response error", axiosError.response);
toast.error(axiosError.response.data?.message || "회원가입에 실패했습니다.");
} else {
console.error("Error", axiosError.message);
toast.error(axiosError.message || "회원가입에 실패했습니다.");
}
},
});
} catch (err: unknown) {
const error = err as { message?: string };
console.error("Error", error.message);
toast.error(error.message || "회원가입에 실패했습니다.");
}
};
Expand Down
1 change: 0 additions & 1 deletion apps/web/src/components/modal/SurveyModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ const SurveyModal = ({ isOpen, onClose, onCloseForWeek }: SurveyModalProps) => {
}
} catch (error) {
// 예외 발생 시
console.error("Failed to open survey:", error);
toast.error("설문 링크를 열 수 없습니다. 수동으로 https://forms.gle/MgygciRxAqfXSWJb6 를 열어주세요.");
}
};
Expand Down
7 changes: 1 addition & 6 deletions apps/web/src/lib/web-socket/useConnectWebSocket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,11 @@ const useConnectWebSocket = ({ roomId, clientRef }: UseConnectWebSocketProps): U
}

setSubmittedMessages((prev) => [...prev, receivedMessage]);
} catch (error) {
console.error("Failed to parse message body:", error);
}
} catch (error) {}
});
};

client.onStompError = (frame) => {
console.error(`Broker reported error: ${frame.headers.message}`);
console.error(`Additional details: ${frame.body}`);
setConnectionStatus(ConnectionStatus.Error);
};

Expand All @@ -80,7 +76,6 @@ const useConnectWebSocket = ({ roomId, clientRef }: UseConnectWebSocketProps): U
client.activate();
clientRef.current = client;
} catch (error) {
console.error("Failed to connect WebSocket:", error);
setConnectionStatus(ConnectionStatus.Error);
}
};
Expand Down
6 changes: 1 addition & 5 deletions apps/web/src/lib/zustand/useSurveyModalStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export const useSurveyModalStore = create<SurveyModalState>((set) => ({
try {
localStorage.setItem(SURVEY_MODAL_STORAGE_KEY, weekLater.toString());
} catch (error) {
console.warn("Failed to save survey modal hide preference:", error);
// 로컬스토리지 저장 실패해도 모달은 닫기
}
set({ isOpen: false });
Expand All @@ -60,7 +59,6 @@ export const useSurveyModalStore = create<SurveyModalState>((set) => ({
try {
hideUntil = localStorage.getItem(SURVEY_MODAL_STORAGE_KEY);
} catch (error) {
console.warn("Failed to read survey modal hide preference:", error);
// 로컬스토리지 읽기 실패 시 모달 표시
set({ isOpen: true });
return;
Expand All @@ -73,9 +71,7 @@ export const useSurveyModalStore = create<SurveyModalState>((set) => ({
// 잘못된 값인 경우 저장된 키 제거
try {
localStorage.removeItem(SURVEY_MODAL_STORAGE_KEY);
} catch (error) {
console.warn("Failed to remove invalid survey modal preference:", error);
}
} catch (error) {}
set({ isOpen: true });
return;
}
Expand Down
1 change: 0 additions & 1 deletion apps/web/src/utils/authCookieUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export const getTokenExpirationSeconds = (accessToken: string): number | null =>
const now = Math.floor(Date.now() / 1000);
return Math.max(0, exp - now);
} catch (error) {
console.error("Failed to parse JWT token:", error);
return null;
}
};
Loading
Loading