From fed1ff76f6630e2b837f6d5188759d2b3570b893 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Sun, 13 Sep 2026 21:58:32 -0700 Subject: [PATCH] Use menu trigger for team navigation and refine top navigation selectors --- src/app/(main)/TopNav.tsx | 9 ++-- src/components/input/TeamsButton.tsx | 60 ++++++++++++-------------- src/components/input/WebsiteSelect.tsx | 7 ++- 3 files changed, 37 insertions(+), 39 deletions(-) diff --git a/src/app/(main)/TopNav.tsx b/src/app/(main)/TopNav.tsx index 829d63444..ef42c73ef 100644 --- a/src/app/(main)/TopNav.tsx +++ b/src/app/(main)/TopNav.tsx @@ -1,7 +1,7 @@ 'use client'; import { Icon, Row } from '@umami/react-zen'; import { useNavigation } from '@/components/hooks'; -import { Slash } from '@/components/icons'; +import { Minus } from '@/components/icons'; import { BoardSelect } from '@/components/input/BoardSelect'; import { LinkSelect } from '@/components/input/LinkSelect'; import { PixelSelect } from '@/components/input/PixelSelect'; @@ -52,8 +52,8 @@ export function TopNav() { {(websiteId || linkId || pixelId || boardId) && ( <> - - + + {websiteId && ( )} diff --git a/src/components/input/TeamsButton.tsx b/src/components/input/TeamsButton.tsx index 4c91065db..bed0d6f1d 100644 --- a/src/components/input/TeamsButton.tsx +++ b/src/components/input/TeamsButton.tsx @@ -1,12 +1,11 @@ import { Button, - DialogTrigger, Icon, Menu, MenuItem, MenuSection, MenuSeparator, - Popover, + MenuTrigger, Row, Text, } from '@umami/react-zen'; @@ -53,7 +52,7 @@ export function TeamsButton() { }; return ( - + - - - - - } label={user.username} /> + + + + } label={user.username} /> + + + + + {user?.teams?.map(({ id, name }) => ( + handleNavigate(getUrl(`/teams/${id}`))}> + }> + {name} + - + ))} - - {user?.teams?.map(({ id, name }) => ( - handleNavigate(getUrl(`/teams/${id}`))}> - }> - {name} - - - ))} - - handleNavigate(getUrl('/settings/teams'))} - > - - Manage teams - - - - - - - - - + handleNavigate(getUrl('/settings/teams'))}> + + Manage teams + + + + + + + + ); } diff --git a/src/components/input/WebsiteSelect.tsx b/src/components/input/WebsiteSelect.tsx index 9f11f7915..8a0ac18cf 100644 --- a/src/components/input/WebsiteSelect.tsx +++ b/src/components/input/WebsiteSelect.tsx @@ -84,8 +84,13 @@ export function WebsiteSelect({ renderValue={renderValue} buttonProps={{ ...buttonProps, + className: [ + 'border-transparent bg-transparent shadow-none hover:border-transparent hover:bg-interactive active:bg-interactive-hover', + buttonProps?.className, + ] + .filter(Boolean) + .join(' '), style: { - minHeight: 40, gap: 0, justifyContent: isCollapsed ? 'start' : undefined, ...buttonProps?.style,