Use status ID instead of passing status objects (#39727)
This commit is contained in:
16 files changed
+145
-157
No files matched your search
@@ -14,7 +14,7 @@ export function useAccountHandle(
|
||||
if (!account) {
|
||||
return null;
|
||||
}
|
||||
let acct = account.get('acct');
|
||||
let acct = account.acct;
|
||||
|
||||
if (!acct.includes('@') && localDomain) {
|
||||
acct = `${acct}@${localDomain}`;
|
||||
|
||||
@@ -3,14 +3,14 @@ import type { ComponentPropsWithoutRef, FC } from 'react';
|
||||
import type { LinkProps } from 'react-router-dom';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
import type { Account } from '@/mastodon/models/account';
|
||||
import type { Account, AccountShapeFull } from '@/mastodon/models/account';
|
||||
|
||||
import { DisplayNameDefault } from './default';
|
||||
import { DisplayNameWithoutDomain } from './no-domain';
|
||||
import { DisplayNameSimple } from './simple';
|
||||
|
||||
export interface DisplayNameProps {
|
||||
account?: Account;
|
||||
account?: Account | AccountShapeFull;
|
||||
localDomain?: string;
|
||||
variant?: 'default' | 'simple' | 'noDomain';
|
||||
}
|
||||
|
||||
@@ -21,9 +21,9 @@ export const DisplayNameWithoutDomain: FC<
|
||||
{account ? (
|
||||
<EmojiHTML
|
||||
className='display-name__html'
|
||||
htmlString={account.get('display_name_html')}
|
||||
htmlString={account.display_name_html}
|
||||
as='strong'
|
||||
extraEmojis={account.get('emojis')}
|
||||
extraEmojis={account.emojis}
|
||||
/>
|
||||
) : (
|
||||
<strong className='display-name__html'>
|
||||
|
||||
@@ -16,8 +16,8 @@ export const DisplayNameSimple: FC<
|
||||
<EmojiHTML
|
||||
{...props}
|
||||
as='span'
|
||||
htmlString={account.get('display_name_html')}
|
||||
extraEmojis={account.get('emojis')}
|
||||
htmlString={account.display_name_html}
|
||||
extraEmojis={account.emojis}
|
||||
/>
|
||||
</bdi>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user