MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / Emoji

Function Emoji

apps/web/ui/Message/Emoji/index.tsx:34–55  ·  view source on GitHub ↗
({ text }: Props)

Source from the content-addressed store, hash-verified

32}
33
34export default function Emoji({ text }: Props) {
35 if (!text) {
36 return null;
37 }
38 const name = unwrap(text);
39 // @ts-ignore
40 if (EMOJIS[name]) {
41 // @ts-ignore
42 return <>{EMOJIS[name]}</>;
43 }
44 const letter = getLetter(name);
45 const color = getColor(letter);
46 return (
47 <span
48 className={classNames(styles.unknown, {
49 [styles[`color-${color}`]]: color,
50 })}
51 >
52 {title(name)}
53 </span>
54 );
55}

Callers

nothing calls this directly

Calls 4

getLetterFunction · 0.90
getColorFunction · 0.90
unwrapFunction · 0.85
titleFunction · 0.85

Tested by

no test coverage detected