From 728b0fc30bc7a7066aa75876fed75087459310fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9B=90=EB=8D=94?= Date: Sat, 30 Jan 2021 20:40:08 +0900 Subject: [PATCH] feat: added logout link preset --- components/Navbar.tsx | 55 +++++++++++++++++++++++++++++++++---------- utils/Constants.ts | 4 +++- utils/Tools.ts | 6 ++--- 3 files changed, 49 insertions(+), 16 deletions(-) diff --git a/components/Navbar.tsx b/components/Navbar.tsx index ce0dc70..60cb8a9 100644 --- a/components/Navbar.tsx +++ b/components/Navbar.tsx @@ -1,7 +1,10 @@ /* eslint-disable jsx-a11y/click-events-have-key-events */ /* eslint-disable jsx-a11y/no-static-element-interactions */ +import { redirectTo } from '@utils/Tools' import Link from 'next/link' +import { useRouter } from 'next/router' import { useState } from 'react' +import DiscordAvatar from './DiscordAvatar' const Navbar = (): JSX.Element => { let userCache @@ -12,6 +15,8 @@ const Navbar = (): JSX.Element => { } const [navbarOpen, setNavbarOpen] = useState(false) + const [dropdownOpen, setDropdownOpen] = useState(false) + const router = useRouter() return ( <>