Address error condition
The code has an error that needs to be addressed.
This commit is contained in:
@@ -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 };
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user