add getEmojiUrl as util function

This commit is contained in:
waltcow
2023-04-05 15:48:44 +08:00
committed by GitHub
parent 80904ac2bb
commit f4fc682fa3
3 changed files with 10 additions and 6 deletions

View File

@@ -17,6 +17,7 @@ import { Message, SubmitKey, useChatStore, BOT_HELLO, ROLES } from "../store";
import {
copyToClipboard,
downloadAs,
getEmojiUrl,
isMobileScreen,
selectOrCopy,
} from "../utils";
@@ -50,7 +51,7 @@ export function Avatar(props: { role: Message["role"] }) {
return (
<div className={styles["user-avtar"]}>
<Emoji unified={config.avatar} size={18} />
<Emoji unified={config.avatar} size={18} getEmojiUrl={getEmojiUrl} />
</div>
);
}