import React, { useContext } from 'react'; import { Text } from 'react-native'; import PropTypes from 'prop-types'; import shortnameToUnicode from '../../../utils/shortnameToUnicode'; import styles from '../styles'; import MessageboxContext from '../Context'; import CustomEmoji from '../../EmojiPicker/CustomEmoji'; import {TEmoji} from "../../EmojiPicker"; interface IMessageBoxMentionEmoji { item: TEmoji; } const MentionEmoji = ({ item }: IMessageBoxMentionEmoji) => { const context = useContext(MessageboxContext); const { baseUrl } = context; if (item.name) { return ( ); } return ( {shortnameToUnicode(`:${ item }:`)} ); }; MentionEmoji.propTypes = { item: PropTypes.object }; export default MentionEmoji;