Browse Source

News Article Page Fixes

Savio Fernando 1 năm trước cách đây
mục cha
commit
f44ca707df
1 tập tin đã thay đổi với 20 bổ sung6 xóa
  1. 20 6
      src/screens/News/NewsDetailPage.js

+ 20 - 6
src/screens/News/NewsDetailPage.js

@@ -108,10 +108,19 @@ const NewsDetailPage = props => {
       color: colors().recessive,
       fontSize: moderateScale(16),
     },
-    newsTagline: {
-      color: colors().recessive_variant,
-      fontFamily: fonts.type.regular,
-      paddingVertical: verticalScale(12),
+    hashTags: {
+      paddingVertical: verticalScale(8),
+      flexDirection: 'row',
+      gap: horizontalScale(8)
+    },
+    hashTag:{
+      color: colors().primaryColor,
+      backgroundColor: colors().dominant_variant,
+      padding: moderateScale(4),
+      paddingHorizontal: horizontalScale(8),
+      fontFamily: fonts.type.semibold,
+      borderRadius: moderateScale(8),
+      fontSize: moderateScale(10)
     },
     newsDescriptorContainer: {
       flexDirection: 'row',
@@ -175,7 +184,7 @@ const NewsDetailPage = props => {
       paddingVertical: verticalScale(4),
     },
     newsText: {
-      color: colors().grayShade_200,
+      color: colors().recessive_variant,
       fontFamily: fonts.type.regular,
       lineHeight: verticalScale(24),
       paddingVertical: verticalScale(4),
@@ -218,7 +227,11 @@ const NewsDetailPage = props => {
             <Text style={styles.newsTitle}
               onPress={() => Linking.openURL(article.source_url)}
             >{article.title}</Text>
-            <Text style={styles.newsTagline}>{'No Tagline'}</Text>
+            <ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={styles.hashTags}>
+              {
+                article.hash_tags.map(item => <Text style={styles.hashTag}>#{item}</Text>)
+              }
+            </ScrollView>
             <View style={styles.newsDescriptorContainer}>
               <Text style={styles.newsDescriptor}>
                 {getTimestamp(article.published_on)}
@@ -376,6 +389,7 @@ const NewsDetailPage = props => {
             <VerticalNewsCard
               image={{ uri: item.cover_image }}
               headline={item.title}
+              timestamp={item.published_on}
               onPress={() => navigateToArticle(navigation, item.id, item.slug)}
             />
           ))}