From f01f28a7eac76c6da5bf857bfc80fd347586ce7f Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Wed, 16 Aug 2023 09:39:47 +0700
Subject: register google

---
 src/pages/my/menu.jsx | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

(limited to 'src/pages/my/menu.jsx')

diff --git a/src/pages/my/menu.jsx b/src/pages/my/menu.jsx
index bd20e2eb..fb8e6b03 100644
--- a/src/pages/my/menu.jsx
+++ b/src/pages/my/menu.jsx
@@ -11,11 +11,12 @@ import { useRouter } from 'next/router'
 export default function Menu() {
   const auth = useAuth()
   const router = useRouter()
-  const {data : session} = useSession()
+  const { data: session } = useSession()
 
   const logout = () => {
-    deleteAuth()
-    router.push('/login')
+    deleteAuth().then(() => {
+      router.push('/login')
+    })
   }
 
   return (
@@ -64,7 +65,7 @@ export default function Menu() {
               <LinkItem href='/my/address'>Daftar Alamat</LinkItem>
             </div>
 
-            <div onClick={() => (logout, signOut)} className='p-4 mt-2'>
+            <div onClick={() => logout()} className='p-4 mt-2'>
               <button className='w-full btn-red'>Keluar Akun</button>
             </div>
           </div>
-- 
cgit v1.2.3

