import {useNavigation} from '@react-navigation/native'; import React from 'react'; import {StyleSheet, Text} from 'react-native'; import {TouchableOpacity} from 'react-native-gesture-handler'; import {MomentPostType, ScreenType} from '../../types'; import {normalize} from '../../utils'; interface MomentCommentPreviewProps { moment: MomentPostType; screenType: ScreenType; } const MomentCommentPreview: React.FC = ({ moment, screenType, }) => { const navigation = useNavigation(); const commentCountText = moment.comments_count === 0 ? 'No Comments' : moment.comments_count + ' comments'; return ( navigation.push('MomentCommentsScreen', { moment_id: moment.moment_id, screenType, }) }> {commentCountText} TODO: Add comment preview here ); }; const styles = StyleSheet.create({ commentsPreviewContainer: { flexDirection: 'column', marginHorizontal: '5%', marginBottom: '2%', borderWidth: 1, }, commentCount: { fontWeight: '700', color: 'white', fontSize: normalize(12), }, }); export default MomentCommentPreview;