From 5de44211bbadb451b5951eb3f77658d9bab42bc5 Mon Sep 17 00:00:00 2001
From: Ashm Walia <40498934+ashmgarv@users.noreply.github.com>
Date: Mon, 7 Dec 2020 15:27:27 -0800
Subject: [TMA - 431] Make socials browsable (#134)

* Open socials apart from twitter on browser

* Revert "Open socials apart from twitter on browser"

This reverts commit 5b6626811ab7cf9a944b22a1d1d5c4047fe47c64.

* Open socials apart from twitter on browser

* Fixed

* make twitter round

* Make some more placeholders browsable

Co-authored-by: Ivan Chen <ivan@tagg.id>
---
 src/components/taggs/TaggPostFooter.tsx | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

(limited to 'src/components/taggs/TaggPostFooter.tsx')

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>
-- 
cgit v1.2.3-70-g09d2

