Fix props in DisplayName component (#36622)
This commit is contained in:
@@ -74,6 +74,6 @@ export const Linked: Story = {
|
|||||||
acct: username,
|
acct: username,
|
||||||
})
|
})
|
||||||
: undefined;
|
: undefined;
|
||||||
return <LinkedDisplayName {...args} displayProps={{ account }} />;
|
return <LinkedDisplayName displayProps={{ account, ...args }} />;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -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}
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user