Commit d508d743 authored by Dion Scheper's avatar Dion Scheper
Browse files

Website is now clickable in the profile link

parent ff1f1041
import React, { Component } from 'react'; import React, { Component } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { ScrollView, Text, View, Animated, TouchableOpacity } from 'react-native'; import { Linking, ScrollView, Text, View, Animated, TouchableOpacity } from 'react-native';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import Icon from 'react-native-vector-icons/MaterialIcons'; import Icon from 'react-native-vector-icons/MaterialIcons';
import LinearGradient from 'react-native-linear-gradient'; import LinearGradient from 'react-native-linear-gradient';
...@@ -62,7 +62,12 @@ const getPersonalInfo = (profile) => { ...@@ -62,7 +62,12 @@ const getPersonalInfo = (profile) => {
{profileData.map((item, i) => ( {profileData.map((item, i) => (
<View style={[styles.item, i !== 0 && styles.borderTop]} key={item.title}> <View style={[styles.item, i !== 0 && styles.borderTop]} key={item.title}>
<Text style={styles.description}>{item.title}</Text> <Text style={styles.description}>{item.title}</Text>
<Text style={styles.data}>{item.value}</Text> <Text
style={item.title === 'Website' ? [styles.data, styles.url] : styles.data}
onPress={item.title === 'Website' ? () => Linking.openURL(`${item.value}`) : null}
>
{item.value}
</Text>
</View> </View>
))} ))}
</View>, </View>,
......
...@@ -41,6 +41,9 @@ const styles = StyleSheet.create({ ...@@ -41,6 +41,9 @@ const styles = StyleSheet.create({
color: colors.gray, color: colors.gray,
fontFamily: 'sans-serif-medium', fontFamily: 'sans-serif-medium',
}, },
url: {
textDecorationLine: 'underline',
},
sectionHeader: { sectionHeader: {
backgroundColor: colors.background, backgroundColor: colors.background,
fontFamily: 'sans-serif-medium', fontFamily: 'sans-serif-medium',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment