import React from 'react'; import { StyleSheet, Text, View } from 'react-native'; import { CustomIcon } from '../../containers/CustomIcon'; import sharedStyles from '../Styles'; import { useTheme } from '../../theme'; import { IMessageFromServer } from '../../definitions'; const styles = StyleSheet.create({ container: { flex: 1, marginTop: 8, 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: IMessageFromServer; date: string; } const DiscussionDetails = ({ item, date }: IDiscussionDetails): React.ReactElement => { const { colors } = useTheme(); let count: string | number | undefined = item.dcount; if (count && count >= 1000) { count = '+999'; } return ( {count} {date} ); }; export default DiscussionDetails;