Echo 12c487cc3e [Glitch] Fix props in DisplayName component
Port 9c7d09993d8cc1e3b54c4bb8839bcbc3a778b342 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2025-10-28 22:34:56 +01:00

25 lines
551 B
TypeScript

import type { ComponentPropsWithoutRef, FC } from 'react';
import { EmojiHTML } from '../emoji/html';
import type { DisplayNameProps } from './index';
export const DisplayNameSimple: FC<
Omit<DisplayNameProps, 'variant'> & ComponentPropsWithoutRef<'span'>
> = ({ account, localDomain: _, ...props }) => {
if (!account) {
return null;
}
return (
<bdi>
<EmojiHTML
{...props}
as='span'
htmlString={account.get('display_name_html')}
extraEmojis={account.get('emojis')}
/>
</bdi>
);
};