Hiding RSS button for saved view on profile page. Fixes #2438 (#2440)

This commit is contained in:
Dessalines 2024-04-25 18:39:07 -04:00 committed by GitHub
parent 6fdec8c06e
commit 5b5f684e98
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 8 deletions

View File

@ -141,7 +141,7 @@
"sortpack"
]
},
"packageManager": "pnpm@9.0.5+sha256.61bd66913b52012107ec25a6ee4d6a161021ab99e04f6acee3aa50d0e34b4af9",
"packageManager": "pnpm@9.0.6+sha256.0624e30eff866cdeb363b15061bdb7fd9425b17bc1bb42c22f5f4efdea21f6b3",
"engineStrict": true,
"importSort": {
".js, .jsx, .ts, .tsx": {

View File

@ -506,7 +506,7 @@ export class Profile extends Component<ProfileRouteProps, ProfileState> {
}
get selects() {
const { sort } = this.props;
const { sort, view } = this.props;
const { username } = this.props.match.params;
const profileRss = `/feeds/u/${username}.xml${getQueryString({ sort })}`;
@ -522,12 +522,19 @@ export class Profile extends Component<ProfileRouteProps, ProfileState> {
hideMostComments
/>
</div>
<div className="col-auto">
<a href={profileRss} rel={relTags} title="RSS">
<Icon icon="rss" classes="text-muted small ps-0" />
</a>
<link rel="alternate" type="application/atom+xml" href={profileRss} />
</div>
{/* Don't show the rss feed for the Saved view, as that's not implemented.*/}
{view !== PersonDetailsView.Saved && (
<div className="col-auto">
<a href={profileRss} rel={relTags} title="RSS">
<Icon icon="rss" classes="text-muted small ps-0" />
</a>
<link
rel="alternate"
type="application/atom+xml"
href={profileRss}
/>
</div>
)}
</div>
);
}