Address error condition

The code has an error that needs to be addressed.
This commit is contained in:
gpt-engineer-app[bot]
2025-03-15 12:09:51 +00:00
parent 5371462b49
commit 66c2240bb2
3 changed files with 129 additions and 21 deletions

View File

@@ -1,4 +1,3 @@
import { supabase } from '@/lib/supabase';
import { toast } from '@/hooks/useToast.wrapper';
@@ -10,14 +9,11 @@ export const signIn = async (email: string, password: string) => {
if (error) {
console.error('로그인 오류:', error);
toast({
title: '로그인 실패',
description: error.message,
variant: 'destructive',
});
return { error };
}
console.log('로그인 성공:', data);
toast({
title: '로그인 성공',
description: '환영합니다!',
@@ -32,11 +28,6 @@ export const signIn = async (email: string, password: string) => {
? '서버 연결에 실패했습니다. 네트워크 연결을 확인해주세요.'
: '예상치 못한 오류가 발생했습니다.';
toast({
title: '로그인 오류',
description: errorMessage,
variant: 'destructive',
});
return { error };
}
};