From 0a0a1aa521dcd525fb2cc552bd9250345ec6a4a3 Mon Sep 17 00:00:00 2001 From: Alan Toa <37520667+alantoa@users.noreply.github.com> Date: Tue, 31 Oct 2023 19:46:54 +0800 Subject: [PATCH] fix: disable truncation of usernames (#2478) --- .../app/components/badge/star-drop-badge.tsx | 3 ++ .../app/components/profile/profile-top.tsx | 49 +++++++++---------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/packages/app/components/badge/star-drop-badge.tsx b/packages/app/components/badge/star-drop-badge.tsx index 8bc640ec78..71f965d110 100644 --- a/packages/app/components/badge/star-drop-badge.tsx +++ b/packages/app/components/badge/star-drop-badge.tsx @@ -12,10 +12,12 @@ type StarDropBadgeProps = Omit< > & { size?: number; data?: StarDropBadgeType; + tw?: string; }; export const StarDropBadge = ({ size = 18, data, + tw, ...rest }: StarDropBadgeProps) => { const router = useRouter(); @@ -29,6 +31,7 @@ export const StarDropBadge = ({ router.push(`/@${data?.username}/${data.slug}`); } }} + tw={tw} > (function ProfileTop({ - - + + (function ProfileTop({ borderWidth: AVATAR_BORDER_SIZE, borderColor: isDark ? "#000" : "#FFF", backgroundColor: isDark ? colors.gray[900] : colors.gray[200], - margin: -AVATAR_BORDER_SIZE, + marginTop: -AVATAR_BORDER_SIZE - 8, }, // avatarStyle, ]} @@ -322,17 +322,17 @@ export const ProfileTop = memo(function ProfileTop({ )} - - + + {name} - + { if (!username) return; await Clipboard.setStringAsync(username); @@ -340,33 +340,30 @@ export const ProfileTop = memo(function ProfileTop({ }} > {Boolean(username) && ( - <> - - {`@${username}`} - - + + {`@${username}`} + )} - - {profileData?.profile.verified ? ( - - - - ) : null} - + {profileData?.profile.verified ? ( + + ) : null} + {profileData?.follows_you && !isSelf ? ( ) : null} - +