mirror of
https://github.com/mastodon/mastodon.git
synced 2025-10-05 16:42:47 +00:00
lazy-loads images, re-adds colons for custom emoji
Some checks are pending
Chromatic / Run Chromatic (push) Waiting to run
Some checks are pending
Chromatic / Run Chromatic (push) Waiting to run
This commit is contained in:
parent
84f3b60b4f
commit
d7c46a002f
|
@ -66,6 +66,7 @@ export const Emoji: FC<EmojiProps> = ({
|
|||
alt={shortcode}
|
||||
title={shortcode}
|
||||
className='emojione custom-emoji'
|
||||
loading='lazy'
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
@ -78,6 +79,7 @@ export const Emoji: FC<EmojiProps> = ({
|
|||
alt={state.data.unicode}
|
||||
title={state.data.label}
|
||||
className='emojione'
|
||||
loading='lazy'
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -318,7 +318,7 @@ export function tokenizeText(text: string): TokenizedText {
|
|||
// Custom emoji
|
||||
tokens.push({
|
||||
type: EMOJI_TYPE_CUSTOM,
|
||||
code: code.slice(1, -1), // Remove the colons
|
||||
code,
|
||||
} satisfies CustomEmojiToken);
|
||||
} else {
|
||||
// Unicode emoji
|
||||
|
|
Loading…
Reference in New Issue
Block a user