[Glitch] Refactor: Replace all display name usage for new component

Port dfef7d9407 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Echo
2025-09-17 11:00:57 +02:00
committed by Claire
parent 210786efd8
commit 0a6895f8b9
21 changed files with 188 additions and 338 deletions

View File

@@ -1,8 +1,8 @@
import PropTypes from 'prop-types';
import { Avatar } from 'flavours/glitch/components/avatar';
import { Permalink } from 'flavours/glitch/components/permalink';
import { useAppSelector } from 'flavours/glitch/store';
import { LinkedDisplayName } from '../../../components/display_name';
export const AuthorLink = ({ accountId }) => {
const account = useAppSelector(state => state.getIn(['accounts', accountId]));
@@ -12,10 +12,9 @@ export const AuthorLink = ({ accountId }) => {
}
return (
<Permalink href={account.get('url')} to={`/@${account.get('acct')}`} className='story__details__shared__author-link' data-hover-card-account={accountId}>
<LinkedDisplayName displayProps={{account}} className='story__details__shared__author-link'>
<Avatar account={account} size={16} />
<bdi dangerouslySetInnerHTML={{ __html: account.get('display_name_html') }} />
</Permalink>
</LinkedDisplayName>
);
};