diff --git a/src/contexts/auth/authActions.ts b/src/contexts/auth/authActions.ts index 895d017..7efe896 100644 --- a/src/contexts/auth/authActions.ts +++ b/src/contexts/auth/authActions.ts @@ -71,7 +71,7 @@ export const signUp = async (email: string, password: string, username: string) } }; -export const signOut = async () => { +export const signOut = async (): Promise => { try { const { error } = await supabase.auth.signOut(); @@ -82,14 +82,12 @@ export const signOut = async () => { description: error.message, variant: 'destructive', }); - return { error }; + } else { + toast({ + title: '로그아웃 성공', + description: '다음에 또 만나요!', + }); } - - toast({ - title: '로그아웃 성공', - description: '다음에 또 만나요!', - }); - return { error: null }; } catch (error: any) { console.error('로그아웃 중 예외 발생:', error); toast({ @@ -97,7 +95,6 @@ export const signOut = async () => { description: '예상치 못한 오류가 발생했습니다.', variant: 'destructive', }); - return { error }; } };