diff --git a/src/components/NewNote/EditBox/EditBox.tsx b/src/components/NewNote/EditBox/EditBox.tsx index 7d5e720..1da2025 100644 --- a/src/components/NewNote/EditBox/EditBox.tsx +++ b/src/components/NewNote/EditBox/EditBox.tsx @@ -947,7 +947,7 @@ const EditBox: Component<{ // Get index of the token and insert emoji character const index = msg.slice(0, cursor).lastIndexOf(':'); - const value = msg.slice(0, index) + emoji.char + msg.slice(cursor); + const value = msg.slice(0, index) + emoji.name + msg.slice(cursor); // Reset query, update message and text area value setMessage(value); @@ -1191,7 +1191,7 @@ const EditBox: Component<{ class={`${styles.emojiOption} ${highlightedEmoji() === index() ? styles.highlight : ''}`} onClick={() => selectEmoji(emoji)} > - {emoji.char} + {emoji.name} )} diff --git a/src/pages/Messages.tsx b/src/pages/Messages.tsx index da62d84..b359fc2 100644 --- a/src/pages/Messages.tsx +++ b/src/pages/Messages.tsx @@ -759,7 +759,7 @@ const Messages: Component = () => { // Get index of the token and insert emoji character const index = msg.slice(0, cursor).lastIndexOf(':'); - const value = msg.slice(0, index) + emoji.char + msg.slice(cursor); + const value = msg.slice(0, index) + emoji.name + msg.slice(cursor); // Reset query, update message and text area value setMessage(value); @@ -1014,7 +1014,7 @@ const Messages: Component = () => { class={`${styles.emojiOption} ${highlightedEmoji() === index() ? styles.highlight : ''}`} onClick={() => selectEmoji(emoji)} > - {emoji.char} + {emoji.name} )} diff --git a/src/types/primal.d.ts b/src/types/primal.d.ts index d5591d6..f8ac946 100644 --- a/src/types/primal.d.ts +++ b/src/types/primal.d.ts @@ -525,9 +525,9 @@ export type UserRelation = 'follows' | 'other' | 'any'; export type EmojiOption = { keywords: string[], - char: string, - fitzpatrick_scale: boolean, - category: string, + char?: string, + fitzpatrick_scale?: boolean, + category?: string, name: string, };