mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-06 17:11:55 +00:00
feat: render custom emoji
This commit is contained in:
@@ -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 (
|
||||
<Emoji
|
||||
alt={match}
|
||||
loading="lazy"
|
||||
className="emoji"
|
||||
draggable={false}
|
||||
src={parseEmoji(
|
||||
emojiDictionary[match as keyof typeof emojiDictionary],
|
||||
)}
|
||||
src={url}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user