import React from 'react'; import { StyleSheet, Text, View, ViewStyle } from 'react-native'; import { CustomIcon } from '../../lib/Icons'; import { themes } from '../../constants/colors'; import sharedStyles from '../Styles'; import { useTheme } from '../../theme'; const styles = StyleSheet.create({ container: { flex: 1, flexDirection: 'row', alignItems: 'center' }, detailsContainer: { flex: 1, flexDirection: 'row' }, detailContainer: { flexDirection: 'row', alignItems: 'center', marginRight: 8 }, detailText: { fontSize: 10, marginLeft: 2, ...sharedStyles.textSemibold } }); interface IDiscussionDetails { item: { dcount: number | string; replies?: any; id: string; }; user: { id: string; }; time: string; style: ViewStyle; } const DiscussionDetails = ({ item, time, style }: IDiscussionDetails) => { const { theme } = useTheme(); let { dcount } = item; if (dcount >= 1000) { dcount = '+999'; } return ( {dcount} {time} ); }; export default DiscussionDetails;