|
@@ -7,7 +7,7 @@ import {
|
|
|
Image,
|
|
|
Linking,
|
|
|
} from 'react-native';
|
|
|
-import React, {useCallback} from 'react';
|
|
|
+import React, { useCallback } from 'react';
|
|
|
import NewscoutTitleHeader from '../../components/molecules/Header/NewscoutTitleHeader';
|
|
|
import MaterialIcon from 'react-native-vector-icons/MaterialIcons';
|
|
|
import colors from '../../constants/colors';
|
|
@@ -41,10 +41,12 @@ import ButtonWrapper from '../../components/atoms/Buttons/ButtonWrapper';
|
|
|
import images from '../../assets/images/images';
|
|
|
import SectionHeader from '../../components/molecules/Header/SectionHeader';
|
|
|
import VerticalNewsCard from '../../components/molecules/Cards/VerticalNewsCard';
|
|
|
+import { TextInput } from 'react-native-paper';
|
|
|
+import FormTextInput from '../../components/atoms/Input/FormTextInput';
|
|
|
|
|
|
const NewsDetailPage = props => {
|
|
|
- const {navigation, route} = props;
|
|
|
- const {id, slug} = route.params;
|
|
|
+ const { navigation, route } = props;
|
|
|
+ const { id, slug } = route.params;
|
|
|
|
|
|
const [isLoading, setLoading] = React.useState(true);
|
|
|
const [article, setArticle] = React.useState({});
|
|
@@ -99,8 +101,8 @@ const NewsDetailPage = props => {
|
|
|
});
|
|
|
|
|
|
const styles = StyleSheet.create({
|
|
|
- container: {backgroundColor: colors().dominant, minHeight: '100%'},
|
|
|
- newsContainer: {paddingHorizontal: horizontalScale(16)},
|
|
|
+ container: { backgroundColor: colors().dominant, minHeight: '100%' },
|
|
|
+ newsContainer: { paddingHorizontal: horizontalScale(16) },
|
|
|
newsTitle: {
|
|
|
fontFamily: fonts.type.semibold,
|
|
|
color: colors().recessive,
|
|
@@ -155,12 +157,17 @@ const NewsDetailPage = props => {
|
|
|
width: 42,
|
|
|
borderRadius: 32,
|
|
|
marginRight: horizontalScale(16),
|
|
|
+ marginVertical: verticalScale(8),
|
|
|
+ backgroundColor: colors().primaryColor
|
|
|
},
|
|
|
commentInput: {
|
|
|
- paddingVertical: verticalScale(16),
|
|
|
- alignItems: 'center',
|
|
|
- justifyContent: 'flex-start',
|
|
|
+ marginVertical: verticalScale(16),
|
|
|
+ alignItems:'stretch',
|
|
|
+ // backgroundColor: colors().black_variant,
|
|
|
flexDirection: 'row',
|
|
|
+ flex: 1
|
|
|
+ // paddingVertical: verticalScale(16)
|
|
|
+ // width:'100%'
|
|
|
},
|
|
|
utilButtons: {
|
|
|
flexDirection: 'row',
|
|
@@ -222,7 +229,7 @@ const NewsDetailPage = props => {
|
|
|
<Text style={styles.newsDescriptor}>{article.source}</Text>
|
|
|
</View>
|
|
|
<View style={styles.imagesContainer}>
|
|
|
- <Image source={{uri: article.cover_image}} style={styles.image} />
|
|
|
+ <Image source={{ uri: article.cover_image }} style={styles.image} />
|
|
|
</View>
|
|
|
<View style={styles.utilButtons}>
|
|
|
<TouchableWithoutFeedback onPress={handlePresentModalPress}>
|
|
@@ -237,7 +244,7 @@ const NewsDetailPage = props => {
|
|
|
</Text>
|
|
|
</View>
|
|
|
</TouchableWithoutFeedback>
|
|
|
- <View style={{flexDirection: 'row'}}>
|
|
|
+ <View style={{ flexDirection: 'row' }}>
|
|
|
<BookmarkButton
|
|
|
buttonStyle={styles.buttonStyle}
|
|
|
iconSize={20}
|
|
@@ -273,8 +280,8 @@ const NewsDetailPage = props => {
|
|
|
minHeight: '100%',
|
|
|
}}
|
|
|
handleStyle={{
|
|
|
- backgroundColor: colors().dominant_variant,
|
|
|
-
|
|
|
+ backgroundColor: colors().dominant,
|
|
|
+
|
|
|
}}>
|
|
|
<BottomSheetScrollView>
|
|
|
<BottomSheetView
|
|
@@ -298,13 +305,44 @@ const NewsDetailPage = props => {
|
|
|
/>
|
|
|
</ButtonWrapper>
|
|
|
</BottomSheetView>
|
|
|
- <View style={styles.commentInput}>
|
|
|
+ <BottomSheetView style={styles.commentInput}>
|
|
|
<Image
|
|
|
source={images.imageCard}
|
|
|
style={[styles.profileImage]}
|
|
|
/>
|
|
|
- <Text>Comment Text Input</Text>
|
|
|
- </View>
|
|
|
+ {/* <View style={{}}> */}
|
|
|
+ <TextInput
|
|
|
+ multiline
|
|
|
+ mode="outlined"
|
|
|
+ placeholder='Add your Comment Here'
|
|
|
+ placeholderTextColor={colors().grayShade_400}
|
|
|
+ dense
|
|
|
+ style={{
|
|
|
+ backgroundColor: colors().dominant,
|
|
|
+ height: verticalScale(64),
|
|
|
+ // justifyContent:'',
|
|
|
+ flexGrow: 1
|
|
|
+
|
|
|
+ }}
|
|
|
+ contentStyle={{
|
|
|
+ color: colors().recessive,
|
|
|
+ fontFamily: fonts.type.regular,
|
|
|
+ fontSize: moderateScale(16),
|
|
|
+
|
|
|
+ }}
|
|
|
+ outlineStyle={{
|
|
|
+ borderRadius: moderateScale(16),
|
|
|
+ borderColor: colors().secondaryColor
|
|
|
+
|
|
|
+
|
|
|
+ // borderColor: colors().dominant,
|
|
|
+ }}
|
|
|
+ cursorColor={colors().primaryColor}
|
|
|
+ />
|
|
|
+ {/* <FormTextInput/> */}
|
|
|
+ {/* </View> */}
|
|
|
+
|
|
|
+ </BottomSheetView>
|
|
|
<>
|
|
|
<Text
|
|
|
style={{
|
|
@@ -315,7 +353,7 @@ const NewsDetailPage = props => {
|
|
|
View all Comments({comments.results.length})
|
|
|
</Text>
|
|
|
</>
|
|
|
- <BottomSheetView style={{gap: moderateScale(16)}}>
|
|
|
+ <BottomSheetView style={{ gap: moderateScale(16) }}>
|
|
|
{comments.results.length <= 0 ? (
|
|
|
<LoadingScreen />
|
|
|
) : (
|
|
@@ -332,11 +370,11 @@ const NewsDetailPage = props => {
|
|
|
<ScrollView
|
|
|
horizontal
|
|
|
contentContainerStyle={styles.recommendationContainer}
|
|
|
- style={{flexDirection: 'row'}}
|
|
|
+ style={{ flexDirection: 'row' }}
|
|
|
showsHorizontalScrollIndicator={false}>
|
|
|
{recommendations.map(item => (
|
|
|
<VerticalNewsCard
|
|
|
- image={{uri: item.cover_image}}
|
|
|
+ image={{ uri: item.cover_image }}
|
|
|
headline={item.title}
|
|
|
onPress={() => navigateToArticle(navigation, item.id, item.slug)}
|
|
|
/>
|