2
0

Fix props in DisplayName component (#36622)

This commit is contained in:
Echo
2025-10-28 15:02:37 +01:00
committed by GitHub
parent 3efc747be3
commit 9c7d09993d
3 changed files with 5 additions and 7 deletions

View File

@@ -74,6 +74,6 @@ export const Linked: Story = {
acct: username, acct: username,
}) })
: undefined; : undefined;
return <LinkedDisplayName {...args} displayProps={{ account }} />; return <LinkedDisplayName displayProps={{ account, ...args }} />;
}, },
}; };

View File

@@ -9,9 +9,8 @@ import { Skeleton } from '../skeleton';
import type { DisplayNameProps } from './index'; import type { DisplayNameProps } from './index';
export const DisplayNameWithoutDomain: FC< export const DisplayNameWithoutDomain: FC<
Omit<DisplayNameProps, 'variant' | 'localDomain'> & Omit<DisplayNameProps, 'variant'> & ComponentPropsWithoutRef<'span'>
ComponentPropsWithoutRef<'span'> > = ({ account, className, children, localDomain: _, ...props }) => {
> = ({ account, className, children, ...props }) => {
return ( return (
<AnimateEmojiProvider <AnimateEmojiProvider
{...props} {...props}

View File

@@ -5,9 +5,8 @@ import { EmojiHTML } from '../emoji/html';
import type { DisplayNameProps } from './index'; import type { DisplayNameProps } from './index';
export const DisplayNameSimple: FC< export const DisplayNameSimple: FC<
Omit<DisplayNameProps, 'variant' | 'localDomain'> & Omit<DisplayNameProps, 'variant'> & ComponentPropsWithoutRef<'span'>
ComponentPropsWithoutRef<'span'> > = ({ account, localDomain: _, ...props }) => {
> = ({ account, ...props }) => {
if (!account) { if (!account) {
return null; return null;
} }