[FIX] ReactionsModal (#2085)
This commit is contained in:
parent
e46ee13b38
commit
f272038ca1
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue