diff options
| author | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-08-14 15:04:45 +0700 |
|---|---|---|
| committer | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-08-14 15:04:45 +0700 |
| commit | 01e86fb4a54b801a9b8124455611c312e5de4af0 (patch) | |
| tree | 09733a6f9fff4c8624bd4a2f2c514d8b16cc684b /src/core/components/elements/Navbar/NavbarUserDropdown.jsx | |
| parent | 4cfe9157d64a76bf9913fe599d908497a18f5316 (diff) | |
google sign in
Diffstat (limited to 'src/core/components/elements/Navbar/NavbarUserDropdown.jsx')
| -rw-r--r-- | src/core/components/elements/Navbar/NavbarUserDropdown.jsx | 8 |
1 files changed, 5 insertions, 3 deletions
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 ( |
