Adding rss links. Fixes #548 (#549)

This commit is contained in:
Dessalines 2022-01-24 22:24:32 -05:00 committed by GitHub
parent cd338b081b
commit 1d085dea12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 45 additions and 39 deletions

View file

@ -354,6 +354,10 @@ export class Community extends Component<any, State> {
}
selects() {
let communityRss = communityRSSUrl(
this.state.communityRes.community_view.community.actor_id,
this.state.sort
);
return (
<div class="mb-3">
<span class="mr-3">
@ -365,16 +369,10 @@ export class Community extends Component<any, State> {
<span class="mr-2">
<SortSelect sort={this.state.sort} onChange={this.handleSortChange} />
</span>
<a
href={communityRSSUrl(
this.state.communityRes.community_view.community.actor_id,
this.state.sort
)}
title="RSS"
rel="noopener"
>
<a href={communityRss} title="RSS" rel="noopener">
<Icon icon="rss" classes="text-muted small" />
</a>
<link rel="alternate" type="application/atom+xml" href={communityRss} />
</div>
);
}