website: Fix bug introduced into optimised build in recent emoji cleanup (#1085)

The issue was the omtimised build was optimising the "+1" object key name to just "1" causing the context menu to try to shown an undefined emoji icon.
This commit is contained in:
Adrian Cowan
2023-02-03 14:21:13 +01:00
committed by GitHub
parent f38897614e
commit 0a9f0aea92
3 changed files with 11 additions and 9 deletions
@@ -9,7 +9,7 @@ interface MessageEmojiButtonProps {
}
export const MessageEmojiButton = ({ emoji, checked, onClick }: MessageEmojiButtonProps) => {
const EmojiIcon = emojiIcons[emoji.name];
const EmojiIcon = emojiIcons.get(emoji.name);
if (!EmojiIcon) return <></>;
return (
<Button
@@ -134,7 +134,7 @@ const EmojiMenuItem = ({
react: (emoji: string, state: boolean) => void;
}) => {
const activeColor = useColorModeValue(colors.light.active, colors.dark.active);
const EmojiIcon = emojiIcons[emoji];
const EmojiIcon = emojiIcons.get(emoji);
return (
<MenuItem onClick={() => react(emoji, !checked)} justifyContent="center" color={checked ? activeColor : undefined}>
<EmojiIcon />