[FIX] ReactionsModal (#2085)

This commit is contained in:
Djorkaeff Alexandre 2020-05-04 11:09:47 -03:00 committed by GitHub
parent e46ee13b38
commit f272038ca1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -1,15 +1,13 @@
import React, { useContext } from 'react'; import React from 'react';
import { Text } from 'react-native'; import { Text } from 'react-native';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import shortnameToUnicode from '../../utils/shortnameToUnicode'; import shortnameToUnicode from '../../utils/shortnameToUnicode';
import CustomEmoji from '../EmojiPicker/CustomEmoji'; import CustomEmoji from '../EmojiPicker/CustomEmoji';
import MessageContext from './Context';
const Emoji = React.memo(({ const Emoji = React.memo(({
content, standardEmojiStyle, customEmojiStyle, getCustomEmoji content, baseUrl, standardEmojiStyle, customEmojiStyle, getCustomEmoji
}) => { }) => {
const { baseUrl } = useContext(MessageContext);
const parsedContent = content.replace(/^:|:$/g, ''); const parsedContent = content.replace(/^:|:$/g, '');
const emoji = getCustomEmoji(parsedContent); const emoji = getCustomEmoji(parsedContent);
if (emoji) { if (emoji) {
@ -20,6 +18,7 @@ const Emoji = React.memo(({
Emoji.propTypes = { Emoji.propTypes = {
content: PropTypes.string, content: PropTypes.string,
baseUrl: PropTypes.string,
standardEmojiStyle: PropTypes.object, standardEmojiStyle: PropTypes.object,
customEmojiStyle: PropTypes.object, customEmojiStyle: PropTypes.object,
getCustomEmoji: PropTypes.func getCustomEmoji: PropTypes.func