[Glitch] Fix custom emojis not being rendered in profile fields
Port b622f4c698fe4d22e6f35be39b7e91199d9eceec to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
550240281e
commit
0aa70234aa
@ -6,7 +6,6 @@ import CheckIcon from '@/material-icons/400-24px/check.svg?react';
|
|||||||
import { Icon } from 'flavours/glitch/components/icon';
|
import { Icon } from 'flavours/glitch/components/icon';
|
||||||
import type { Account } from 'flavours/glitch/models/account';
|
import type { Account } from 'flavours/glitch/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…
x
Reference in New Issue
Block a user