diff --git a/src/components/emoji-text.jsx b/src/components/emoji-text.jsx index caa94215..d904f727 100644 --- a/src/components/emoji-text.jsx +++ b/src/components/emoji-text.jsx @@ -9,17 +9,21 @@ function EmojiText({ text, emojis }) { const elements = text.split(regex).map((word) => { const emoji = emojis.find((e) => e.shortcode === word); if (emoji) { + const { url, staticUrl } = emoji; return ( - {word} + + + {word} + ); } return word; diff --git a/src/utils/emojify-text.js b/src/utils/emojify-text.js index 9f4ae50f..d2b4ab44 100644 --- a/src/utils/emojify-text.js +++ b/src/utils/emojify-text.js @@ -8,7 +8,7 @@ function emojifyText(text, emojis = []) { const { shortcode, staticUrl, url } = emoji; text = text.replace( new RegExp(`:${shortcode}:`, 'g'), - `:${shortcode}:`, + `:${shortcode}:`, ); }); // console.log(text, emojis);