fixed clicable link

This commit is contained in:
u-e 2018-12-20 15:36:36 +03:00
parent a35ea1dda4
commit bc43c41487

View File

@ -1,6 +1,12 @@
import React, { Component, Fragment } from 'react';
import {
View, Image, Text, TouchableOpacity, Dimensions, ActivityIndicator,
View,
Image,
Text,
TouchableOpacity,
Dimensions,
ActivityIndicator,
Linking,
} from 'react-native';
// Constants
@ -33,6 +39,9 @@ class ProfileSummaryView extends Component {
// Component Life Cycles
// Component Functions
_handleOnPressLink = (url) => {
Linking.openURL(url);
};
render() {
const { isShowPercentText } = this.state;
@ -80,7 +89,14 @@ class ProfileSummaryView extends Component {
<Fragment>
<View style={[isColumn ? styles.textWithIconWrapperColumn : styles.textWithIconWrapper]}>
{!!location && <TextWithIcon text={location} iconName="md-navigate" />}
{!!link && <TextWithIcon isClickable text={link} iconName="md-globe" />}
{!!link && (
<TextWithIcon
isClickable
onPress={() => this._handleOnPressLink(link)}
text={link}
iconName="md-globe"
/>
)}
{!!date && <TextWithIcon text={date} iconName="md-calendar" />}
</View>
<View />
@ -114,9 +130,12 @@ class ProfileSummaryView extends Component {
<TouchableOpacity onPress={() => handleOnFollowsPress(false)}>
<View style={styles.followCountWrapper}>
<Text style={styles.followCount}>{followerCount}</Text>
<Text style={styles.followText}> {intl.formatMessage({
<Text style={styles.followText}>
{' '}
{intl.formatMessage({
id: 'profile.follower',
})}</Text>
})}
</Text>
</View>
</TouchableOpacity>
<TouchableOpacity onPress={() => handleOnFollowsPress(true)}>