From befe4ac37fbb31e4568912a8952a700c60cb4548 Mon Sep 17 00:00:00 2001 From: TZGyn Date: Fri, 1 Sep 2023 03:26:50 +0800 Subject: [PATCH] Update navbar category dropdown trigger to button --- components/navbar.tsx | 56 ++++++++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 19 deletions(-) diff --git a/components/navbar.tsx b/components/navbar.tsx index ec8bf9a..f3f6766 100644 --- a/components/navbar.tsx +++ b/components/navbar.tsx @@ -17,6 +17,7 @@ import { } from '@nextui-org/dropdown' import { Avatar, AvatarIcon } from '@nextui-org/avatar' import { Link } from '@nextui-org/link' +import { Button } from '@nextui-org/react' import { link as linkStyles } from '@nextui-org/theme' @@ -25,7 +26,7 @@ import NextLink from 'next/link' import clsx from 'clsx' import { ThemeSwitch } from '@/components/theme-switch' -import { GithubIcon } from '@/components/icons' +import { ChevronDown, GithubIcon } from '@/components/icons' import { Icon } from '@iconify/react' import NewBookmarkForm from '@/components/newBookmarkForm' @@ -72,23 +73,40 @@ export const Navbar = ({

Dashboard

- + )} { - const response = await fetch('/api/auth/logout', { + await fetch('/api/auth/logout', { method: 'POST', }) router.refresh()