2 Комити f0620fe0bd ... e26dc1c689

Аутор SHA1 Порука Датум
  Savio Fernando e26dc1c689 Display recommendations if only available пре 10 месеци
  Savio Fernando 24c41b408b Altered Horizontal Scroll Zone for Smooth Scrolling пре 10 месеци
2 измењених фајлова са 28 додато и 28 уклоњено
  1. 1 1
      src/components/organisms/Sections/TrendingSection.js
  2. 27 27
      src/screens/News/NewsDetailPage.js

+ 1 - 1
src/components/organisms/Sections/TrendingSection.js

@@ -110,7 +110,7 @@ const TrendingSection = props => {
               parallaxScrollingOffset: 1,
             }}
             panGestureHandlerProps={{
-              activeOffsetX: [-50, 1050],
+              activeOffsetX: [0, 200],
             }}
             pagingEnabled
             onSnapToItem={index => updateCurrentIndex(index)}

+ 27 - 27
src/screens/News/NewsDetailPage.js

@@ -174,7 +174,7 @@ const NewsDetailPage = props => {
     commentInput: {
       marginVertical: verticalScale(16),
       alignItems: 'flex-start',
-      justifyContent:'space-between',
+      justifyContent: 'space-between',
       flexDirection: 'row',
       maxWidth: '100%',
     },
@@ -217,7 +217,7 @@ const NewsDetailPage = props => {
   return (
     <BottomSheetModalProvider>
       <ScrollView ref={mainPageRef} contentContainerStyle={styles.container}>
-        <NewscoutTitleHeader headerStyle={{elevation: 0}}
+        <NewscoutTitleHeader headerStyle={{ elevation: 0 }}
           backButtonShown
           onBackClick={() => navigation.goBack()}>
           <TouchableWithoutFeedback onPress={() => navigation.toggleDrawer()}>
@@ -324,22 +324,22 @@ const NewsDetailPage = props => {
                           }}>
                           {comments.results.length}
                         </Text>
-                        </BottomSheetView>
-                        <ButtonWrapper onPress={handleCloseModalPress}>
-                          <IonIcon
-                            name="close-sharp"
-                            size={moderateScale(20)}
-                            color={colors().recessive}
-                          />
-                        </ButtonWrapper>
-                      
+                      </BottomSheetView>
+                      <ButtonWrapper onPress={handleCloseModalPress}>
+                        <IonIcon
+                          name="close-sharp"
+                          size={moderateScale(20)}
+                          color={colors().recessive}
+                        />
+                      </ButtonWrapper>
+
                     </BottomSheetView>
                     <View style={styles.commentInput}>
                       <Image
                         source={images.imageCard}
                         style={[styles.profileImage]}
                       />
-                      
+
                       <TextInput
                         multiline
                         mode="outlined"
@@ -389,21 +389,21 @@ const NewsDetailPage = props => {
             </>
           </View>
         )}
-        <SectionHeader label={'Recommendations'} isButtonShown={false}/>
-        <ScrollView
-          horizontal
-          contentContainerStyle={styles.recommendationContainer}
-          style={{ flexDirection: 'row' }}
-          showsHorizontalScrollIndicator={false}>
-          { recommendations.length > 0 ? recommendations.map(item => (
-            <VerticalNewsCard
-              image={{ uri: item.cover_image }}
-              headline={item.title}
-              timestamp={item.published_on}
-              onPress={() => navigateToArticle(navigation, item.id, item.slug)}
-            />
-          )) : <LoadingScreen containerHeight={verticalScale(240)} containerWidth={screenWidth}/>}
-        </ScrollView>
+        {recommendations.length > 0 ? <><SectionHeader label={'Recommendations'} isButtonShown={false} />
+          <ScrollView
+            horizontal
+            contentContainerStyle={styles.recommendationContainer}
+            style={{ flexDirection: 'row' }}
+            showsHorizontalScrollIndicator={false}>
+            {recommendations.map(item => (
+              <VerticalNewsCard
+                image={{ uri: item.cover_image }}
+                headline={item.title}
+                timestamp={item.published_on}
+                onPress={() => navigateToArticle(navigation, item.id, item.slug)}
+              />
+            ))}
+          </ScrollView></> : <></>}
       </ScrollView>
     </BottomSheetModalProvider>
   );