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

View file

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