Hide "View profile header" if there's no header

pull/1128/head
Lim Chee Aun 2025-04-27 13:09:53 +08:00
rodzic c99bba1918
commit e64c0286c2
1 zmienionych plików z 19 dodań i 17 usunięć

Wyświetl plik

@ -634,23 +634,25 @@ function AccountInfo({
<Trans>View profile image</Trans> <Trans>View profile image</Trans>
</span> </span>
</MenuItem> </MenuItem>
<MenuItem {!!headerStatic && !headerIsAvatar && (
onClick={() => { <MenuItem
states.showMediaModal = { onClick={() => {
mediaAttachments: [ states.showMediaModal = {
{ mediaAttachments: [
type: 'image', {
url: headerStatic, type: 'image',
}, url: headerStatic,
], },
}; ],
}} };
> }}
<Icon icon="media" /> >
<span> <Icon icon="media" />
<Trans>View profile header</Trans> <span>
</span> <Trans>View profile header</Trans>
</MenuItem> </span>
</MenuItem>
)}
{currentAuthenticated && {currentAuthenticated &&
isSelf && isSelf &&
supports('@mastodon/profile-edit') && ( supports('@mastodon/profile-edit') && (