diff --git a/src/components/profileSummary/view/profileSummaryView.js b/src/components/profileSummary/view/profileSummaryView.js index 030feb7af..b1ae76255 100644 --- a/src/components/profileSummary/view/profileSummaryView.js +++ b/src/components/profileSummary/view/profileSummaryView.js @@ -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 @@ -19,9 +25,9 @@ const DEVICE_WIDTH = Dimensions.get('window').width; class ProfileSummaryView extends Component { /* Props - * ------------------------------------------------ - * @prop { type } name - Description.... - */ + * ------------------------------------------------ + * @prop { type } name - Description.... + */ constructor(props) { super(props); @@ -33,6 +39,9 @@ class ProfileSummaryView extends Component { // Component Life Cycles // Component Functions + _handleOnPressLink = (url) => { + Linking.openURL(url); + }; render() { const { isShowPercentText } = this.state; @@ -67,10 +76,10 @@ class ProfileSummaryView extends Component { const rowLength = location ? location.length : null + link - ? link.length - : null + date - ? date.length - : null; + ? link.length + : null + date + ? date.length + : null; const isColumn = rowLength && DEVICE_WIDTH / rowLength <= 15; const followButtonIcon = !isFollowing ? 'user-follow' : 'user-unfollow'; @@ -80,7 +89,14 @@ class ProfileSummaryView extends Component { {!!location && } - {!!link && } + {!!link && ( + this._handleOnPressLink(link)} + text={link} + iconName="md-globe" + /> + )} {!!date && } @@ -114,9 +130,12 @@ class ProfileSummaryView extends Component { handleOnFollowsPress(false)}> {followerCount} - {intl.formatMessage({ - id: 'profile.follower', - })} + + {' '} + {intl.formatMessage({ + id: 'profile.follower', + })} + handleOnFollowsPress(true)}>