Przeglądaj źródła

Implement Open Original Article on Title Press

Savio Fernando 1 rok temu
rodzic
commit
b2689e19c4
1 zmienionych plików z 4 dodań i 1 usunięć
  1. 4 1
      src/screens/News/NewsDetailPage.js

+ 4 - 1
src/screens/News/NewsDetailPage.js

@@ -5,6 +5,7 @@ import {
   TouchableWithoutFeedback,
   ScrollView,
   Image,
+  Linking,
 } from 'react-native';
 import React, {useCallback} from 'react';
 import NewscoutTitleHeader from '../../components/molecules/Header/NewscoutTitleHeader';
@@ -207,7 +208,9 @@ const NewsDetailPage = props => {
           <LoadingScreen />
         ) : (
           <View style={styles.newsContainer}>
-            <Text style={styles.newsTitle}>{article.title}</Text>
+            <Text style={styles.newsTitle}
+              onPress={() => Linking.openURL(article.source_url)}
+            >{article.title}</Text>
             <Text style={styles.newsTagline}>{'No Tagline'}</Text>
             <View style={styles.newsDescriptorContainer}>
               <Text style={styles.newsDescriptor}>