From b36eea8c579ed542c88a914d0b44c52e9d92b0f5 Mon Sep 17 00:00:00 2001 From: MohamedBassem Date: Sat, 12 Oct 2024 18:12:32 +0000 Subject: feature(web): Implement a new profile options drop menu and move user and admin settings there --- .../components/dashboard/header/ProfileOptions.tsx | 31 ++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) (limited to 'apps/web/components/dashboard/header/ProfileOptions.tsx') diff --git a/apps/web/components/dashboard/header/ProfileOptions.tsx b/apps/web/components/dashboard/header/ProfileOptions.tsx index df31171c..ea8c7d12 100644 --- a/apps/web/components/dashboard/header/ProfileOptions.tsx +++ b/apps/web/components/dashboard/header/ProfileOptions.tsx @@ -10,7 +10,8 @@ import { DropdownMenuItem, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; -import { LogOut, Moon, Paintbrush, Sun } from "lucide-react"; +import { Separator } from "@/components/ui/separator"; +import { LogOut, Moon, Paintbrush, Settings, Shield, Sun } from "lucide-react"; import { signOut, useSession } from "next-auth/react"; import { useTheme } from "next-themes"; @@ -49,7 +50,32 @@ export default function SidebarProfileOptions() { {session.user.name?.charAt(0) ?? "U"} - + +
+
+ {session.user.name?.charAt(0) ?? "U"} +
+
+

{session.user.name}

+

{session.user.email}

+
+
+ + + + + User Settings + + + {session.user.role == "admin" && ( + + + + Admin Settings + + + )} + @@ -59,6 +85,7 @@ export default function SidebarProfileOptions() { + signOut({ -- cgit v1.2.3-70-g09d2