Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

Fix teams button overflow in mobile

Francis Cao98d1d85ed106
diff --git a/src/components/input/TeamsButton.tsx b/src/components/input/TeamsButton.tsx
index 527ab1fa9..f44ba83a5 100644
--- a/src/components/input/TeamsButton.tsx
+++ b/src/components/input/TeamsButton.tsx
@@ -23,6 +23,7 @@ export function TeamsButton() {
const { user } = useLoginQuery();
const { t, labels } = useMessages();
const { teamId, router } = useNavigation();
+ const { isPhone } = useMobile();
const team = user?.teams?.find(({ id }) => id === teamId);
const selectedKeys = new Set([teamId || 'user']);
const label = teamId ? team?.name : user.username;
@@ -52,7 +53,7 @@ export function TeamsButton() {
position="relative"
gap
maxHeight="40px"
- minWidth="200px"
+ minWidth={isPhone ? '100px' : '200px'}
maxWidth="200px"
>
<Icon>{teamId ? <Users /> : <User />}</Icon>