mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-26 20:36:25 +00:00
[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:
@@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user