mirror of
https://github.com/yingziwu/mastodon.git
synced 2026-02-04 03:25:14 +00:00
Fix custom emojis not being rendered in profile fields (#37365)
This commit is contained in:
parent
3013039720
commit
a846ed17ff
1 changed files with 4 additions and 3 deletions
|
|
@ -6,7 +6,6 @@ import CheckIcon from '@/material-icons/400-24px/check.svg?react';
|
||||||
import { Icon } from 'mastodon/components/icon';
|
import { Icon } from 'mastodon/components/icon';
|
||||||
import type { Account } from 'mastodon/models/account';
|
import type { Account } from 'mastodon/models/account';
|
||||||
|
|
||||||
import { CustomEmojiProvider } from './emoji/context';
|
|
||||||
import { EmojiHTML } from './emoji/html';
|
import { EmojiHTML } from './emoji/html';
|
||||||
import { useElementHandledLink } from './status/handled_link';
|
import { useElementHandledLink } from './status/handled_link';
|
||||||
|
|
||||||
|
|
@ -22,12 +21,13 @@ export const AccountFields: React.FC<Pick<Account, 'fields' | 'emojis'>> = ({
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<CustomEmojiProvider emojis={emojis}>
|
<>
|
||||||
{fields.map((pair, i) => (
|
{fields.map((pair, i) => (
|
||||||
<dl key={i} className={classNames({ verified: pair.verified_at })}>
|
<dl key={i} className={classNames({ verified: pair.verified_at })}>
|
||||||
<EmojiHTML
|
<EmojiHTML
|
||||||
as='dt'
|
as='dt'
|
||||||
htmlString={pair.name_emojified}
|
htmlString={pair.name_emojified}
|
||||||
|
extraEmojis={emojis}
|
||||||
className='translate'
|
className='translate'
|
||||||
{...htmlHandlers}
|
{...htmlHandlers}
|
||||||
/>
|
/>
|
||||||
|
|
@ -52,12 +52,13 @@ export const AccountFields: React.FC<Pick<Account, 'fields' | 'emojis'>> = ({
|
||||||
<EmojiHTML
|
<EmojiHTML
|
||||||
as='span'
|
as='span'
|
||||||
htmlString={pair.value_emojified}
|
htmlString={pair.value_emojified}
|
||||||
|
extraEmojis={emojis}
|
||||||
{...htmlHandlers}
|
{...htmlHandlers}
|
||||||
/>
|
/>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
))}
|
))}
|
||||||
</CustomEmojiProvider>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue