mirror of
https://github.com/PrimalHQ/primal-web-app.git
synced 2024-10-01 17:31:13 +00:00
Fix emoji search due to version change
This commit is contained in:
parent
caec3d415d
commit
e306b5c414
@ -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}
|
||||
</button>
|
||||
)}
|
||||
</For>
|
||||
|
@ -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}
|
||||
</button>
|
||||
)}
|
||||
</For>
|
||||
|
6
src/types/primal.d.ts
vendored
6
src/types/primal.d.ts
vendored
@ -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,
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user