diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index 1c90fcb..c4f6394 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -11,6 +11,7 @@ import { import { GlobeAltIcon } from "@heroicons/react/24/outline"; import Link from "next/link"; import Avatar from "./Avatar"; +import { Tooltip, TooltipContent, TooltipTrigger } from "./ui/Tooltip"; import { Card } from "./ui/card"; import { Popover, PopoverContent, PopoverTrigger } from "./ui/popover"; @@ -23,18 +24,59 @@ interface ButtonProps { function NavbarButton({ text, icon, href, ariaLabel }: ButtonProps) { return ( -
- - <> - {icon} -

{text}

- -
-
+ + <> + {icon} +

{text}

+ +
+ ); +} + +function FriendsButton() { + const settingsStore = useStore(useSettingsStore, (state) => state); + + return ( + + + } + /> + + + {settingsStore?.friends.length == 0 ? ( +

No friends, add someone!

+ ) : ( + settingsStore?.friends.map((friend) => { + return ( + +
+ +
+

#{friend.rank}

+

{friend.name}

+
+
+ + ); + }) + )} +
+
); } @@ -59,42 +101,13 @@ export default function Navbar() { /> )} - - - } - /> - - - {settingsStore?.friends.length == 0 ? ( -

No friends, add someone!

- ) : ( - settingsStore?.friends.map((friend) => { - return ( - -
- -
-

#{friend.rank}

-

{friend.name}

-
-
- - ); - }) - )} -
-
+ + + + + Click to view your friends + +