import React from 'react'; import PropTypes from 'prop-types'; import { Text } from 'react-native'; import { emojify } from 'react-emojione'; import CustomEmoji from '../EmojiPicker/CustomEmoji'; import styles from './styles'; const Emoji = React.memo(({ emojiName, literal, isMessageContainsOnlyEmoji, getCustomEmoji, baseUrl }) => { const emojiUnicode = emojify(literal, { output: 'unicode' }); const emoji = getCustomEmoji && getCustomEmoji(emojiName); if (emoji) { return ( ); } return {emojiUnicode}; }); Emoji.propTypes = { emojiName: PropTypes.string, literal: PropTypes.string, isMessageContainsOnlyEmoji: PropTypes.bool, getCustomEmoji: PropTypes.func, baseUrl: PropTypes.string }; export default Emoji;