Merge commit 'c858fc77ef194be0217fd98eae84efd261dba798' into glitch-soc/merge-upstream

This commit is contained in:
Claire committed 2025-10-09 17:59:13 +02:00
commit 490c89a5a9
21 files changed
+273 -88

No files matched your search

@@ -1,23 +0,0 @@
import PropTypes from 'prop-types';
import { Avatar } from 'mastodon/components/avatar';
import { useAppSelector } from 'mastodon/store';
import { LinkedDisplayName } from '@/mastodon/components/display_name';
export const AuthorLink = ({ accountId }) => {
const account = useAppSelector(state => state.getIn(['accounts', accountId]));
if (!account) {
return null;
}
return (
<LinkedDisplayName displayProps={{account}} className='story__details__shared__author-link'>
<Avatar account={account} size={16} />
</LinkedDisplayName>
);
};
AuthorLink.propTypes = {
accountId: PropTypes.string.isRequired,
};
@@ -0,0 +1,22 @@
import type { FC } from 'react';
import { LinkedDisplayName } from '@/mastodon/components/display_name';
import { Avatar } from 'mastodon/components/avatar';
import { useAppSelector } from 'mastodon/store';
export const AuthorLink: FC<{ accountId: string }> = ({ accountId }) => {
const account = useAppSelector((state) => state.accounts.get(accountId));
if (!account) {
return null;
}
return (
<LinkedDisplayName
displayProps={{ account, variant: 'simple' }}
className='story__details__shared__author-link'
>
<Avatar account={account} size={16} />
</LinkedDisplayName>
);
};
@@ -48,9 +48,8 @@ export const EmbeddedStatusContent: React.FC<{
);
const htmlHandlers = useElementHandledLink({
hashtagAccountId: status.get('account') as string | undefined,
hrefToMentionAccountId(href) {
const mention = mentions.find((item) => item.url === href);
return mention?.id;
hrefToMention(href) {
return mentions.find((item) => item.url === href);
},
});