From ec96dde694f9de44b4039670ce33313807009d7d Mon Sep 17 00:00:00 2001 From: Paul Makles Date: Fri, 8 Jul 2022 17:14:15 +0100 Subject: [PATCH] feat: render custom emoji --- src/components/markdown/plugins/emoji.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/markdown/plugins/emoji.tsx b/src/components/markdown/plugins/emoji.tsx index f97e85bc..033af2de 100644 --- a/src/components/markdown/plugins/emoji.tsx +++ b/src/components/markdown/plugins/emoji.tsx @@ -15,15 +15,19 @@ const Emoji = styled.img` `; export function RenderEmoji({ match }: CustomComponentProps) { + const url = + match in emojiDictionary + ? parseEmoji(emojiDictionary[match as keyof typeof emojiDictionary]) + : clientController.getAvailableClient().emojis!.get(match)! + .imageURL; + return ( ); }