|
@@ -42,6 +42,7 @@ import UnverifiedIcon from '../../../../assets/icons/unverified.svg';
|
|
import CommentsIcon from '../../../../assets/icons/messages/comments.svg';
|
|
import CommentsIcon from '../../../../assets/icons/messages/comments.svg';
|
|
import MapSvg from 'assets/icons/travels-screens/map-location.svg';
|
|
import MapSvg from 'assets/icons/travels-screens/map-location.svg';
|
|
import InfoIcon from 'assets/icons/info-solid.svg';
|
|
import InfoIcon from 'assets/icons/info-solid.svg';
|
|
|
|
+import PremiumIcon from 'assets/icons/premium.svg';
|
|
|
|
|
|
import { ProfileStyles, ScoreStyles, TBTStyles } from '../TravellersScreen/Components/styles';
|
|
import { ProfileStyles, ScoreStyles, TBTStyles } from '../TravellersScreen/Components/styles';
|
|
import UnauthenticatedProfileScreen from './UnauthenticatedProfileScreen';
|
|
import UnauthenticatedProfileScreen from './UnauthenticatedProfileScreen';
|
|
@@ -266,26 +267,40 @@ const ProfileScreen: FC<Props> = ({ navigation, route }) => {
|
|
|
|
|
|
<View style={styles.pageWrapper}>
|
|
<View style={styles.pageWrapper}>
|
|
<View style={{ gap: 8 }}>
|
|
<View style={{ gap: 8 }}>
|
|
- {data.user_data.avatar ? (
|
|
|
|
- <TouchableOpacity
|
|
|
|
- onPress={() => setFullSizeImageVisible(true)}
|
|
|
|
- disabled={!data.user_data.avatar}
|
|
|
|
- >
|
|
|
|
- <Image
|
|
|
|
- style={styles.avatar}
|
|
|
|
- source={{
|
|
|
|
- uri: API_HOST + '/img/avatars/' + data.user_data.avatar + '?v=' + avatarVersion
|
|
|
|
- }}
|
|
|
|
|
|
+ <View style={{ position: 'relative' }}>
|
|
|
|
+ {data.user_data.avatar ? (
|
|
|
|
+ <TouchableOpacity
|
|
|
|
+ onPress={() => setFullSizeImageVisible(true)}
|
|
|
|
+ disabled={!data.user_data.avatar}
|
|
|
|
+ >
|
|
|
|
+ <Image
|
|
|
|
+ style={styles.avatar}
|
|
|
|
+ source={{
|
|
|
|
+ uri:
|
|
|
|
+ API_HOST + '/img/avatars/' + data.user_data.avatar + '?v=' + avatarVersion
|
|
|
|
+ }}
|
|
|
|
+ />
|
|
|
|
+ </TouchableOpacity>
|
|
|
|
+ ) : (
|
|
|
|
+ <AvatarWithInitials
|
|
|
|
+ text={`${data.user_data.first_name[0] ?? ''}${data.user_data.last_name[0] ?? ''}`}
|
|
|
|
+ flag={API_HOST + '/img/flags_new/' + data.user_data.flag1}
|
|
|
|
+ size={64}
|
|
|
|
+ borderColor={Colors.WHITE}
|
|
/>
|
|
/>
|
|
- </TouchableOpacity>
|
|
|
|
- ) : (
|
|
|
|
- <AvatarWithInitials
|
|
|
|
- text={`${data.user_data.first_name[0] ?? ''}${data.user_data.last_name[0] ?? ''}`}
|
|
|
|
- flag={API_HOST + '/img/flags_new/' + data.user_data.flag1}
|
|
|
|
- size={64}
|
|
|
|
- borderColor={Colors.WHITE}
|
|
|
|
- />
|
|
|
|
- )}
|
|
|
|
|
|
+ )}
|
|
|
|
+ <View
|
|
|
|
+ style={{
|
|
|
|
+ position: 'absolute',
|
|
|
|
+ bottom: 0,
|
|
|
|
+ right: 0,
|
|
|
|
+ justifyContent: 'center',
|
|
|
|
+ alignItems: 'center'
|
|
|
|
+ }}
|
|
|
|
+ >
|
|
|
|
+ {data.user_data.badge_premium ? <PremiumIcon /> : null}
|
|
|
|
+ </View>
|
|
|
|
+ </View>
|
|
{data.scores.rank_tbt && data.scores.rank_tbt >= 1 ? <TBRanking /> : null}
|
|
{data.scores.rank_tbt && data.scores.rank_tbt >= 1 ? <TBRanking /> : null}
|
|
{isFriend === 1 && token && data.own_profile === 0 ? (
|
|
{isFriend === 1 && token && data.own_profile === 0 ? (
|
|
<TouchableOpacity style={styles.friend} onPress={() => openModal('isModalVisible')}>
|
|
<TouchableOpacity style={styles.friend} onPress={() => openModal('isModalVisible')}>
|
|
@@ -397,6 +412,7 @@ const ProfileScreen: FC<Props> = ({ navigation, route }) => {
|
|
badge_un_75: data.user_data.badge_un_75,
|
|
badge_un_75: data.user_data.badge_un_75,
|
|
badge_un_100: data.user_data.badge_un_100,
|
|
badge_un_100: data.user_data.badge_un_100,
|
|
badge_un_150: data.user_data.badge_un_150,
|
|
badge_un_150: data.user_data.badge_un_150,
|
|
|
|
+ badge_premium: data.user_data.badge_premium,
|
|
scores: data.scores
|
|
scores: data.scores
|
|
}
|
|
}
|
|
})
|
|
})
|