aboutsummaryrefslogtreecommitdiff
path: root/src/components/profile/ProfileBody.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/profile/ProfileBody.tsx')
-rw-r--r--src/components/profile/ProfileBody.tsx18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/components/profile/ProfileBody.tsx b/src/components/profile/ProfileBody.tsx
index 57800578..49ee74ee 100644
--- a/src/components/profile/ProfileBody.tsx
+++ b/src/components/profile/ProfileBody.tsx
@@ -14,7 +14,7 @@ interface ProfileBodyProps {
isOwnProfile: boolean;
handleFollowUnfollow: Function;
handleBlockUnblock: Function;
- userXId: string;
+ userXId: string | undefined;
screenType: ScreenType;
}
const ProfileBody: React.FC<ProfileBodyProps> = ({
@@ -33,7 +33,7 @@ const ProfileBody: React.FC<ProfileBodyProps> = ({
} = userXId
? useSelector((state: RootState) => state.userX[screenType][userXId])
: useSelector((state: RootState) => state.user);
-
+
const {biography, website} = profile;
return (
<View onLayout={onLayout} style={styles.container}>
@@ -41,11 +41,15 @@ const ProfileBody: React.FC<ProfileBodyProps> = ({
{biography.length > 0 && (
<Text style={styles.biography}>{`${biography}`}</Text>
)}
- {website.length > 0 && <Text style={styles.website} onPress={() => {
- Linking.openURL(
- website.startsWith('http') ? website : 'http://' + website,
- );
- }}>{`${website}`}</Text>}
+ {website.length > 0 && (
+ <Text
+ style={styles.website}
+ onPress={() => {
+ Linking.openURL(
+ website.startsWith('http') ? website : 'http://' + website,
+ );
+ }}>{`${website}`}</Text>
+ )}
{userXId && !isOwnProfile ? (
<View style={styles.toggleButtonContainer}>
{!isBlocked && (