From 01e86fb4a54b801a9b8124455611c312e5de4af0 Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Mon, 14 Aug 2023 15:04:45 +0700
Subject: google sign in

---
 src/core/components/elements/Navbar/NavbarUserDropdown.jsx | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

(limited to 'src/core/components/elements/Navbar/NavbarUserDropdown.jsx')

diff --git a/src/core/components/elements/Navbar/NavbarUserDropdown.jsx b/src/core/components/elements/Navbar/NavbarUserDropdown.jsx
index 7848124c..b58be493 100644
--- a/src/core/components/elements/Navbar/NavbarUserDropdown.jsx
+++ b/src/core/components/elements/Navbar/NavbarUserDropdown.jsx
@@ -1,13 +1,15 @@
 import { deleteAuth } from '@/core/utils/auth'
 import Link from '../Link/Link'
 import { useRouter } from 'next/router'
+import { signOut, useSession } from 'next-auth/react'
 
 const NavbarUserDropdown = () => {
   const router = useRouter()
 
-  const logout = () => {
-    deleteAuth()
-    router.push('/login')
+  const logout = async () => {
+    deleteAuth().then(() => {
+      router.push('/login')
+    })
   }
 
   return (
-- 
cgit v1.2.3

