Rocket.Chat.ReactNative/app/containers/message/ReadReceipt.tsx

18 lines
609 B
TypeScript
Raw Normal View History

import React from 'react';
import { themes } from '../../lib/constants';
import { CustomIcon } from '../CustomIcon';
import styles from './styles';
import { useTheme } from '../../theme';
const ReadReceipt = React.memo(({ isReadReceiptEnabled, unread }: { isReadReceiptEnabled?: boolean; unread: boolean }) => {
const { theme } = useTheme();
if (isReadReceiptEnabled && !unread && unread !== null) {
2019-12-04 16:39:53 +00:00
return <CustomIcon name='check' color={themes[theme].tintColor} size={15} style={styles.readReceipt} />;
}
return null;
});
ReadReceipt.displayName = 'MessageReadReceipt';
export default ReadReceipt;