aboutsummaryrefslogtreecommitdiff
path: root/src/components/taggs/TaggPostFooter.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/taggs/TaggPostFooter.tsx')
-rw-r--r--src/components/taggs/TaggPostFooter.tsx9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/components/taggs/TaggPostFooter.tsx b/src/components/taggs/TaggPostFooter.tsx
index 8371a847..ae9d889d 100644
--- a/src/components/taggs/TaggPostFooter.tsx
+++ b/src/components/taggs/TaggPostFooter.tsx
@@ -1,6 +1,7 @@
import React from 'react';
-import {StyleSheet, View} from 'react-native';
+import {Linking, StyleSheet, View} from 'react-native';
import {Text} from 'react-native-animatable';
+import {handleOpenSocialUrlOnBrowser} from '../../utils';
import {DateLabel} from '../common';
interface TaggPostFooterProps {
@@ -8,12 +9,14 @@ interface TaggPostFooterProps {
handle?: string;
caption: string;
timestamp: string;
+ social: string;
}
const TaggPostFooter: React.FC<TaggPostFooterProps> = ({
likes,
handle,
caption,
timestamp,
+ social,
}) => {
const handleText = handle ? handle : '';
return (
@@ -21,7 +24,9 @@ const TaggPostFooter: React.FC<TaggPostFooterProps> = ({
<View style={styles.container}>
{likes ? <Text style={styles.likeText}>{likes} likes</Text> : <></>}
<View style={styles.captionContainer}>
- <Text style={styles.handleText}>
+ <Text
+ style={styles.handleText}
+ onPress={() => handleOpenSocialUrlOnBrowser(handleText, social)}>
{handleText}
<Text style={styles.captionText}> {caption}</Text>
</Text>