mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-09-11 11:50:17 +08:00
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:
@@ -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 />
|
||||
|
||||
Reference in New Issue
Block a user