diff options
author | Ivan Chen <ivan@tagg.id> | 2021-05-04 13:31:10 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-04 13:31:10 -0400 |
commit | 5a8d92bcd869ada1079bc36b6598c899a8a9246d (patch) | |
tree | 75633eb5d0a20bff2f01401cdd33e50bddeadc0d /src/components/profile/ProfileHeader.tsx | |
parent | caac607ed90c35ad8d4b2787b170e1fd1f165333 (diff) | |
parent | 745d04cd5a9709d1ca4dc417fa1cf0c882ea587c (diff) |
Merge pull request #393 from IvanIFChen/tma763-long-names-cutoff
[TMA-763] Long names cutoff on profile header
Diffstat (limited to 'src/components/profile/ProfileHeader.tsx')
-rw-r--r-- | src/components/profile/ProfileHeader.tsx | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/components/profile/ProfileHeader.tsx b/src/components/profile/ProfileHeader.tsx index 35ec0ea9..62c2e1e3 100644 --- a/src/components/profile/ProfileHeader.tsx +++ b/src/components/profile/ProfileHeader.tsx @@ -45,7 +45,6 @@ const ProfileHeader: React.FC<ProfileHeaderProps> = ({ const [drawerVisible, setDrawerVisible] = useState(false); const [showBadgeView, setBadgeViewVisible] = useState(false); - const [firstName, lastName] = [...name.split(' ')]; const containerRef = useRef(null); const childRef = useRef(null); @@ -113,15 +112,9 @@ const ProfileHeader: React.FC<ProfileHeaderProps> = ({ screenType={screenType} /> <View style={styles.header}> - {name.length <= 16 ? ( - <Text style={styles.name}>{name}</Text> - ) : ( - <View> - <Text style={styles.name}>{firstName}</Text> - <Text style={styles.name}>{lastName}</Text> - </View> - )} - + <Text style={styles.name} numberOfLines={2}> + {name} + </Text> <View style={styles.friendsAndUniversity}> <FriendsCount screenType={screenType} userXId={userXId} /> <TouchableOpacity |