Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const RepliedThread = React.memo(({
tmid, tmsg, isHeader, isTemp, fetchThreadName, id
}) => {
if (!tmid || !isHeader || isTemp) {
return null;
}
if (!tmsg) {
fetchThreadName(tmid, id);
return null;
}
let msg = shortnameToUnicode(tmsg);
msg = removeMarkdown(msg);
return (
);
}, (prevProps, nextProps) => {
if (prevProps.tmid !== nextProps.tmid) {
const Emoji = React.memo(({
emojiName, literal, isMessageContainsOnlyEmoji, getCustomEmoji, baseUrl, customEmojis, style = [], theme
}) => {
const emojiUnicode = shortnameToUnicode(literal);
const emoji = getCustomEmoji && getCustomEmoji(emojiName);
if (emoji && customEmojis) {
return (
);
}
return (
renderMarkdown = text => {
let html = marked(text);
return emojiToolkit.toImage(html);
};