diff --git a/website/src/components/Header/UserMenu.tsx b/website/src/components/Header/UserMenu.tsx index b99d4a1f..8835c7c2 100644 --- a/website/src/components/Header/UserMenu.tsx +++ b/website/src/components/Header/UserMenu.tsx @@ -1,16 +1,24 @@ -import { Box, Link, Text, useColorModeValue } from "@chakra-ui/react"; -import { Popover } from "@headlessui/react"; -import { AnimatePresence, motion } from "framer-motion"; -import Image from "next/image"; -import NextLink from "next/link"; +import { + Avatar, + Box, + Link, + Menu, + MenuButton, + MenuDivider, + MenuGroup, + MenuItem, + MenuList, + Text, + useColorModeValue, +} from "@chakra-ui/react"; import { signOut, useSession } from "next-auth/react"; import React from "react"; import { FiAlertTriangle, FiLayout, FiLogOut, FiSettings, FiShield } from "react-icons/fi"; export function UserMenu() { + const borderColor = useColorModeValue("gray.300", "gray.600"); + const { data: session } = useSession(); - const backgroundColor = useColorModeValue("white", "gray.700"); - const accentColor = useColorModeValue("gray.300", "gray.600"); if (!session) { return <>; @@ -29,6 +37,8 @@ export function UserMenu() { desc: "Account Settings", icon: FiSettings, }, + ]; + const helpOptions = [ { name: "Report a Bug", href: "https://github.com/LAION-AI/Open-Assistant/issues/new/choose", @@ -47,87 +57,53 @@ export function UserMenu() { } return ( - - {({ open }) => ( - <> - - - Profile Picture -

- {session.user.name || session.user.email} -

-
-
- - {open && ( - - - - - {accountOptions.map((item) => ( - -
-
-
- {item.name} -
- - ))} - signOut({ callbackUrl: "/" })} - > -
- -
-
- Sign Out -
- -
-
-
-
- )} -
- - )} -
+ <> + + + + + + {session.user.name || session.user.email} + + + + + + {session.user.name} + + 3,200 + + + + + {accountOptions.map((item) => ( + + + + + ))} + + + + {helpOptions.map((item) => ( + + + + + ))} + + + signOut({ callbackUrl: "/" })}> + + + + ); } }