chore: bump UI library

This commit is contained in:
Paul Makles
2022-07-10 14:27:00 +01:00
parent 2d3eb46d6b
commit a710af7cb4
3 changed files with 17 additions and 16 deletions

View File

@@ -147,16 +147,7 @@ const HackAlertThisFileWillBeReplaced = observer(({ channel }: Props) => {
const renderEmoji = useMemo(
() =>
memo(({ emoji }: { emoji: string }) => (
<a
onClick={() => {
const v = state.draft.get(channel._id);
state.draft.set(
channel._id,
`${v ? `${v} ` : ""}:${emoji}:`,
);
}}>
<RenderEmoji match={emoji} {...({} as any)} />
</a>
<RenderEmoji match={emoji} {...({} as any)} />
)),
[],
);
@@ -184,11 +175,21 @@ const HackAlertThisFileWillBeReplaced = observer(({ channel }: Props) => {
}
}
categories.push({
id: "default",
name: "Default",
emoji: "smiley",
});
return (
<Picker
emojis={emojis}
categories={categories}
renderEmoji={renderEmoji}
onSelect={(emoji) => {
const v = state.draft.get(channel._id);
state.draft.set(channel._id, `${v ? `${v} ` : ""}:${emoji}:`);
}}
/>
);
});