From 52b84b1d28e00b2efeb36fc05e1f5eb11688e55c Mon Sep 17 00:00:00 2001 From: DIYgod Date: Mon, 6 Feb 2023 18:27:31 +0000 Subject: [PATCH] fix: folded sidebar text overflow --- src/components/common/ConnectButton.tsx | 54 +++++++++++--------- src/components/dashboard/DashboardLayout.tsx | 1 + 2 files changed, 30 insertions(+), 25 deletions(-) diff --git a/src/components/common/ConnectButton.tsx b/src/components/common/ConnectButton.tsx index 8be9a4db..01a53397 100644 --- a/src/components/common/ConnectButton.tsx +++ b/src/components/common/ConnectButton.tsx @@ -32,12 +32,14 @@ export const ConnectButton: React.FC<{ size?: "base" | "sm" hideNotification?: boolean mobileSimplification?: boolean + hideName?: boolean }> = ({ left, variant, size = "sm", hideNotification, mobileSimplification, + hideName, }) => { let avatarSize let sizeDecrease @@ -167,37 +169,39 @@ export const ConnectButton: React.FC<{ name={userSites.data?.[0]?.name} size={avatarSize} /> -
- - {userSites.data?.[0]?.name || - getAccountDisplayName(account)} - - {userSites.data?.[0]?.username && ( - {"@" + userSites.data?.[0]?.username || + {userSites.data?.[0]?.name || getAccountDisplayName(account)} - )} -
+ {userSites.data?.[0]?.username && ( + + {"@" + userSites.data?.[0]?.username || + getAccountDisplayName(account)} + + )} + + )} } dropdown={ diff --git a/src/components/dashboard/DashboardLayout.tsx b/src/components/dashboard/DashboardLayout.tsx index 2c1d42ff..38149a80 100644 --- a/src/components/dashboard/DashboardLayout.tsx +++ b/src/components/dashboard/DashboardLayout.tsx @@ -121,6 +121,7 @@ export function DashboardLayout({ left={true} size="base" hideNotification={true} + hideName={!isOpen} />