From e73b214045c827b8df55a5b2904683258dcbc900 Mon Sep 17 00:00:00 2001 From: Kentai Radiquum Date: Tue, 16 Jul 2024 16:23:09 +0500 Subject: [PATCH] feat: add user menu --- app/components/Navbar/Navbar.jsx | 52 ++++++++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a/app/components/Navbar/Navbar.jsx b/app/components/Navbar/Navbar.jsx index 418f6f9..83805b7 100644 --- a/app/components/Navbar/Navbar.jsx +++ b/app/components/Navbar/Navbar.jsx @@ -2,6 +2,7 @@ import Link from "next/link"; import { usePathname } from "next/navigation"; import { useUserStore } from "@/app/store/auth"; +import { Dropdown } from "flowbite-react"; export const Navbar = () => { const pathname = usePathname(); @@ -90,13 +91,60 @@ export const Navbar = () => { })} {userStore.isAuth ? ( -
+
-

{userStore.user.login}

+ + { + userStore.logout(); + }} + > + + Выйти + + {navLinks.map((link) => { + return ( + + + + + {link.title} + + + + ); + })} +
) : (