Skip to content

Commit 3db1a03

Browse files
committed
fix: github 로그인 로딩 및 에러 상태 처리 추가
1 parent 72b5d87 commit 3db1a03

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

components/auth/LoginForm.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,16 @@ const LoginForm = ({ handleOpenModal }: LoginFormProps) => {
2323
const router = useRouter();
2424

2525
const handleGithubLogin = async () => {
26+
if (isLoading) return;
27+
setIsLoading(true);
28+
setError('');
2629
try {
2730
await signupWithGithub();
2831
router.push('/');
2932
} catch (err: unknown) {
30-
if (err instanceof Error) {
31-
}
33+
setError('Github 로그인에 실패했습니다.');
34+
} finally {
35+
setIsLoading(false);
3236
}
3337
};
3438

0 commit comments

Comments
 (0)