From efd0170f819e26771723152fab6bf766be0a09b1 Mon Sep 17 00:00:00 2001 From: inhyuck Date: Sat, 28 Aug 2021 12:17:21 +0900 Subject: [PATCH] =?UTF-8?q?[Nexters/covid-letter-web#161]=20=F0=9F=90=9B?= =?UTF-8?q?=20react-google-logout=20=EA=B5=AC=EA=B8=80=20=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=EC=95=84=EC=9B=83=20=EC=8B=A4=ED=8C=A8=20=EC=8B=9C?= =?UTF-8?q?=EC=97=90=EB=8F=84=20=EC=BF=A0=ED=82=A4=EB=8A=94=20=EB=A7=8C?= =?UTF-8?q?=EB=A3=8C=EC=B2=98=EB=A6=AC=EB=90=98=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/useLogout.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/hooks/useLogout.ts b/src/hooks/useLogout.ts index 6d6f4ef4..12b6f0ba 100644 --- a/src/hooks/useLogout.ts +++ b/src/hooks/useLogout.ts @@ -1,6 +1,7 @@ import {useGoogleLogout} from 'react-google-login' import {GOOGLE} from '$config' import {withAxios} from '$utils/fetcher/withAxios' +import {noop} from '$utils/index' const useLogout = (isGoogleLogin: boolean) => { const requestLogout = async () => { @@ -11,7 +12,7 @@ const useLogout = (isGoogleLogin: boolean) => { const {signOut} = useGoogleLogout({ clientId: GOOGLE.CLIENT_ID, - onLogoutSuccess: requestLogout, + onLogoutSuccess: noop, onFailure: () => { console.error('구글 계정 로그아웃에 실패했습니다.') }, @@ -20,8 +21,8 @@ const useLogout = (isGoogleLogin: boolean) => { return () => { if (isGoogleLogin) { signOut() - return } + requestLogout() } }