|
@@ -14,6 +14,7 @@ import colors from '../../constants/colors';
|
|
import {
|
|
import {
|
|
horizontalScale,
|
|
horizontalScale,
|
|
moderateScale,
|
|
moderateScale,
|
|
|
|
+ screenWidth,
|
|
verticalScale,
|
|
verticalScale,
|
|
} from '../../constants/metrics';
|
|
} from '../../constants/metrics';
|
|
import {
|
|
import {
|
|
@@ -172,9 +173,10 @@ const NewsDetailPage = props => {
|
|
},
|
|
},
|
|
commentInput: {
|
|
commentInput: {
|
|
marginVertical: verticalScale(16),
|
|
marginVertical: verticalScale(16),
|
|
- alignItems: 'stretch',
|
|
|
|
|
|
+ alignItems: 'flex-start',
|
|
|
|
+ justifyContent:'space-between',
|
|
flexDirection: 'row',
|
|
flexDirection: 'row',
|
|
- flex: 1
|
|
|
|
|
|
+ maxWidth: '100%',
|
|
},
|
|
},
|
|
utilButtons: {
|
|
utilButtons: {
|
|
flexDirection: 'row',
|
|
flexDirection: 'row',
|
|
@@ -332,7 +334,7 @@ const NewsDetailPage = props => {
|
|
</ButtonWrapper>
|
|
</ButtonWrapper>
|
|
|
|
|
|
</BottomSheetView>
|
|
</BottomSheetView>
|
|
- <BottomSheetView style={styles.commentInput}>
|
|
|
|
|
|
+ <View style={styles.commentInput}>
|
|
<Image
|
|
<Image
|
|
source={images.imageCard}
|
|
source={images.imageCard}
|
|
style={[styles.profileImage]}
|
|
style={[styles.profileImage]}
|
|
@@ -346,15 +348,16 @@ const NewsDetailPage = props => {
|
|
dense
|
|
dense
|
|
style={{
|
|
style={{
|
|
backgroundColor: colors().dominant,
|
|
backgroundColor: colors().dominant,
|
|
- height: verticalScale(64),
|
|
|
|
-
|
|
|
|
- flexGrow: 1
|
|
|
|
|
|
+ minHeight: verticalScale(64),
|
|
|
|
+ flex: 1,
|
|
|
|
+ paddingVertical: verticalScale(8)
|
|
|
|
|
|
}}
|
|
}}
|
|
contentStyle={{
|
|
contentStyle={{
|
|
color: colors().recessive,
|
|
color: colors().recessive,
|
|
fontFamily: fonts.type.regular,
|
|
fontFamily: fonts.type.regular,
|
|
fontSize: moderateScale(16),
|
|
fontSize: moderateScale(16),
|
|
|
|
+
|
|
|
|
|
|
}}
|
|
}}
|
|
outlineStyle={{
|
|
outlineStyle={{
|
|
@@ -363,7 +366,7 @@ const NewsDetailPage = props => {
|
|
}}
|
|
}}
|
|
cursorColor={colors().primaryColor}
|
|
cursorColor={colors().primaryColor}
|
|
/>
|
|
/>
|
|
- </BottomSheetView>
|
|
|
|
|
|
+ </View>
|
|
<>
|
|
<>
|
|
<Text
|
|
<Text
|
|
style={{
|
|
style={{
|
|
@@ -393,14 +396,14 @@ const NewsDetailPage = props => {
|
|
contentContainerStyle={styles.recommendationContainer}
|
|
contentContainerStyle={styles.recommendationContainer}
|
|
style={{ flexDirection: 'row' }}
|
|
style={{ flexDirection: 'row' }}
|
|
showsHorizontalScrollIndicator={false}>
|
|
showsHorizontalScrollIndicator={false}>
|
|
- {recommendations.map(item => (
|
|
|
|
|
|
+ { recommendations.length > 0 ? recommendations.map(item => (
|
|
<VerticalNewsCard
|
|
<VerticalNewsCard
|
|
image={{ uri: item.cover_image }}
|
|
image={{ uri: item.cover_image }}
|
|
headline={item.title}
|
|
headline={item.title}
|
|
timestamp={item.published_on}
|
|
timestamp={item.published_on}
|
|
onPress={() => navigateToArticle(navigation, item.id, item.slug)}
|
|
onPress={() => navigateToArticle(navigation, item.id, item.slug)}
|
|
/>
|
|
/>
|
|
- ))}
|
|
|
|
|
|
+ )) : <LoadingScreen containerHeight={verticalScale(240)} containerWidth={screenWidth}/>}
|
|
</ScrollView>
|
|
</ScrollView>
|
|
</ScrollView>
|
|
</ScrollView>
|
|
</BottomSheetModalProvider>
|
|
</BottomSheetModalProvider>
|