|
@@ -109,10 +109,15 @@ const ProfileScreen: FC<Props> = ({ navigation, route }) => {
|
|
|
|
|
|
{!isPublicView ? (
|
|
{!isPublicView ? (
|
|
<TouchableOpacity
|
|
<TouchableOpacity
|
|
- style={{ paddingVertical: 4 }}
|
|
|
|
|
|
+ style={styles.settings}
|
|
onPress={() => navigation.navigate(NAVIGATION_PAGES.SETTINGS)}
|
|
onPress={() => navigation.navigate(NAVIGATION_PAGES.SETTINGS)}
|
|
>
|
|
>
|
|
- <GearIcon fill={Colors.DARK_BLUE} />
|
|
|
|
|
|
+ <GearIcon
|
|
|
|
+ width={20}
|
|
|
|
+ height={20}
|
|
|
|
+ fill={Colors.DARK_BLUE}
|
|
|
|
+ style={{ alignSelf: 'center' }}
|
|
|
|
+ />
|
|
</TouchableOpacity>
|
|
</TouchableOpacity>
|
|
) : null}
|
|
) : null}
|
|
</View>
|
|
</View>
|
|
@@ -160,6 +165,17 @@ const PersonalInfo: FC<PersonalInfoProps> = ({ data }) => {
|
|
url && Linking.openURL(url);
|
|
url && Linking.openURL(url);
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+ const hasActiveLinks = () => {
|
|
|
|
+ return (
|
|
|
|
+ (data.links?.f?.link && data.links?.f?.active !== 0) ||
|
|
|
|
+ (data.links?.i?.link && data.links?.i?.active !== 0) ||
|
|
|
|
+ (data.links?.t?.link && data.links?.t?.active !== 0) ||
|
|
|
|
+ (data.links?.y?.link && data.links?.y?.active !== 0) ||
|
|
|
|
+ (data.links?.www?.link && data.links?.www?.active !== 0) ||
|
|
|
|
+ (data.links?.other?.link && data.links?.other?.active !== 0)
|
|
|
|
+ );
|
|
|
|
+ };
|
|
|
|
+
|
|
return (
|
|
return (
|
|
<ScrollView
|
|
<ScrollView
|
|
showsVerticalScrollIndicator={false}
|
|
showsVerticalScrollIndicator={false}
|
|
@@ -184,17 +200,19 @@ const PersonalInfo: FC<PersonalInfoProps> = ({ data }) => {
|
|
})}
|
|
})}
|
|
</View>
|
|
</View>
|
|
</InfoItem>
|
|
</InfoItem>
|
|
- <InfoItem showMore={showMoreSeries} inline={true} title={'SERIES BADGES'}>
|
|
|
|
- {data.series?.slice(0, showMoreSeries ? data.series.length : 8).map((data, index) => (
|
|
|
|
- <View
|
|
|
|
- key={index}
|
|
|
|
- style={{ display: 'flex', flexDirection: 'column', gap: 5, alignItems: 'center' }}
|
|
|
|
- >
|
|
|
|
- <Image source={{ uri: API_HOST + data.icon_png }} style={{ width: 28, height: 28 }} />
|
|
|
|
- <Text style={[styles.headerText, { flex: 0 }]}>{data.score}</Text>
|
|
|
|
- </View>
|
|
|
|
- ))}
|
|
|
|
- </InfoItem>
|
|
|
|
|
|
+ {data.series?.length > 0 && (
|
|
|
|
+ <InfoItem showMore={showMoreSeries} inline={true} title={'SERIES BADGES'}>
|
|
|
|
+ {data.series?.slice(0, showMoreSeries ? data.series.length : 8).map((data, index) => (
|
|
|
|
+ <View
|
|
|
|
+ key={index}
|
|
|
|
+ style={{ display: 'flex', flexDirection: 'column', gap: 5, alignItems: 'center' }}
|
|
|
|
+ >
|
|
|
|
+ <Image source={{ uri: API_HOST + data.icon_png }} style={{ width: 28, height: 28 }} />
|
|
|
|
+ <Text style={[styles.headerText, { flex: 0 }]}>{data.score}</Text>
|
|
|
|
+ </View>
|
|
|
|
+ ))}
|
|
|
|
+ </InfoItem>
|
|
|
|
+ )}
|
|
{data.series?.length > 8 ? (
|
|
{data.series?.length > 8 ? (
|
|
<TouchableOpacity onPress={() => setShowMoreSeries(!showMoreSeries)}>
|
|
<TouchableOpacity onPress={() => setShowMoreSeries(!showMoreSeries)}>
|
|
<View
|
|
<View
|
|
@@ -221,43 +239,47 @@ const PersonalInfo: FC<PersonalInfoProps> = ({ data }) => {
|
|
<Text style={styles.titleText}>{data.homebase2}</Text>
|
|
<Text style={styles.titleText}>{data.homebase2}</Text>
|
|
</View>
|
|
</View>
|
|
) : null}
|
|
) : null}
|
|
- <InfoItem title={'BIO'}>
|
|
|
|
- <Text style={[styles.titleText, { flex: 0 }]}>{data.bio}</Text>
|
|
|
|
- </InfoItem>
|
|
|
|
- <InfoItem title={'SOCIAL LINKS'}>
|
|
|
|
- <View style={styles.linksBox}>
|
|
|
|
- {data.links?.f?.link && data.links?.f?.active !== 0 ? (
|
|
|
|
- <TouchableOpacity onPress={() => handleOpenUrl(data.links?.f?.link)}>
|
|
|
|
- <IconFacebook fill={Colors.DARK_BLUE} />
|
|
|
|
- </TouchableOpacity>
|
|
|
|
- ) : null}
|
|
|
|
- {data.links?.i?.link && data.links?.i?.active !== 0 ? (
|
|
|
|
- <TouchableOpacity onPress={() => handleOpenUrl(data.links?.i?.link)}>
|
|
|
|
- <IconInstagram fill={Colors.DARK_BLUE} />
|
|
|
|
- </TouchableOpacity>
|
|
|
|
- ) : null}
|
|
|
|
- {data.links?.t?.link && data.links?.t?.active !== 0 ? (
|
|
|
|
- <TouchableOpacity onPress={() => handleOpenUrl(data.links?.t?.link)}>
|
|
|
|
- <IconTwitter fill={Colors.DARK_BLUE} />
|
|
|
|
- </TouchableOpacity>
|
|
|
|
- ) : null}
|
|
|
|
- {data.links?.y?.link && data.links?.y?.active !== 0 ? (
|
|
|
|
- <TouchableOpacity onPress={() => handleOpenUrl(data.links?.y?.link)}>
|
|
|
|
- <IconYouTube fill={Colors.DARK_BLUE} />
|
|
|
|
- </TouchableOpacity>
|
|
|
|
- ) : null}
|
|
|
|
- {data.links?.www?.link && data.links?.www?.active !== 0 ? (
|
|
|
|
- <TouchableOpacity onPress={() => handleOpenUrl(data.links?.www?.link)}>
|
|
|
|
- <IconGlobe fill={Colors.DARK_BLUE} />
|
|
|
|
- </TouchableOpacity>
|
|
|
|
- ) : null}
|
|
|
|
- {data.links?.other?.link && data.links?.other?.active !== 0 ? (
|
|
|
|
- <TouchableOpacity onPress={() => handleOpenUrl(data.links?.other?.link)}>
|
|
|
|
- <IconLink fill={Colors.DARK_BLUE} />
|
|
|
|
- </TouchableOpacity>
|
|
|
|
- ) : null}
|
|
|
|
- </View>
|
|
|
|
- </InfoItem>
|
|
|
|
|
|
+ {data.bio && data.bio.length > 0 && (
|
|
|
|
+ <InfoItem title={'BIO'}>
|
|
|
|
+ <Text style={[styles.titleText, { flex: 0 }]}>{data.bio}</Text>
|
|
|
|
+ </InfoItem>
|
|
|
|
+ )}
|
|
|
|
+ {hasActiveLinks() && (
|
|
|
|
+ <InfoItem title={'SOCIAL LINKS'}>
|
|
|
|
+ <View style={styles.linksBox}>
|
|
|
|
+ {data.links?.f?.link && data.links?.f?.active !== 0 ? (
|
|
|
|
+ <TouchableOpacity onPress={() => handleOpenUrl(data.links?.f?.link)}>
|
|
|
|
+ <IconFacebook fill={Colors.DARK_BLUE} />
|
|
|
|
+ </TouchableOpacity>
|
|
|
|
+ ) : null}
|
|
|
|
+ {data.links?.i?.link && data.links?.i?.active !== 0 ? (
|
|
|
|
+ <TouchableOpacity onPress={() => handleOpenUrl(data.links?.i?.link)}>
|
|
|
|
+ <IconInstagram fill={Colors.DARK_BLUE} />
|
|
|
|
+ </TouchableOpacity>
|
|
|
|
+ ) : null}
|
|
|
|
+ {data.links?.t?.link && data.links?.t?.active !== 0 ? (
|
|
|
|
+ <TouchableOpacity onPress={() => handleOpenUrl(data.links?.t?.link)}>
|
|
|
|
+ <IconTwitter fill={Colors.DARK_BLUE} />
|
|
|
|
+ </TouchableOpacity>
|
|
|
|
+ ) : null}
|
|
|
|
+ {data.links?.y?.link && data.links?.y?.active !== 0 ? (
|
|
|
|
+ <TouchableOpacity onPress={() => handleOpenUrl(data.links?.y?.link)}>
|
|
|
|
+ <IconYouTube fill={Colors.DARK_BLUE} />
|
|
|
|
+ </TouchableOpacity>
|
|
|
|
+ ) : null}
|
|
|
|
+ {data.links?.www?.link && data.links?.www?.active !== 0 ? (
|
|
|
|
+ <TouchableOpacity onPress={() => handleOpenUrl(data.links?.www?.link)}>
|
|
|
|
+ <IconGlobe fill={Colors.DARK_BLUE} />
|
|
|
|
+ </TouchableOpacity>
|
|
|
|
+ ) : null}
|
|
|
|
+ {data.links?.other?.link && data.links?.other?.active !== 0 ? (
|
|
|
|
+ <TouchableOpacity onPress={() => handleOpenUrl(data.links?.other?.link)}>
|
|
|
|
+ <IconLink fill={Colors.DARK_BLUE} />
|
|
|
|
+ </TouchableOpacity>
|
|
|
|
+ ) : null}
|
|
|
|
+ </View>
|
|
|
|
+ </InfoItem>
|
|
|
|
+ )}
|
|
</ScrollView>
|
|
</ScrollView>
|
|
);
|
|
);
|
|
};
|
|
};
|