Commit 3d8a9f19 authored by Wietse Kuipers's avatar Wietse Kuipers

Merge branch 'feature/clickable_profile_link' into 'master'

Website is now clickable in the profile link

See merge request !77
parents 33b17fb8 d508d743
import React, { Component } from 'react';
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 Icon from 'react-native-vector-icons/MaterialIcons';
import LinearGradient from 'react-native-linear-gradient';
......@@ -62,7 +62,12 @@ const getPersonalInfo = (profile) => {
{profileData.map((item, i) => (
<View style={[styles.item, i !== 0 && styles.borderTop]} key={item.title}>
<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>,
......
......@@ -41,6 +41,9 @@ const styles = StyleSheet.create({
color: colors.gray,
fontFamily: 'sans-serif-medium',
},
url: {
textDecorationLine: 'underline',
},
sectionHeader: {
backgroundColor: colors.background,
fontFamily: 'sans-serif-medium',
......
Markdown is supported
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