Hide create community (#787)

* Adding post and comment language tagging. Fixes #771

* Hiding create community button. Fixes #754
This commit is contained in:
Dessalines 2022-09-22 11:14:58 -04:00 committed by GitHub
parent 6320357d21
commit c6e3a4213a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 321 additions and 36 deletions

View file

@ -38,6 +38,7 @@ import {
import { UserService, WebSocketService } from "../../services";
import {
auth,
canCreateCommunity,
commentsToFlatNodes,
createCommentLikeRes,
createPostLikeFindRes,
@ -430,7 +431,8 @@ export class Home extends Component<any, HomeState> {
<div className="card border-secondary mb-3">
<div className="card-body">
{this.trendingCommunities()}
{this.createCommunityButton()}
{canCreateCommunity(this.state.siteRes) &&
this.createCommunityButton()}
{this.exploreCommunitiesButton()}
</div>
</div>
@ -579,6 +581,7 @@ export class Home extends Component<any, HomeState> {
removeDuplicates
enableDownvotes={enableDownvotes(this.state.siteRes)}
enableNsfw={enableNsfw(this.state.siteRes)}
allLanguages={this.state.siteRes.all_languages}
/>
) : (
<CommentNodes
@ -591,6 +594,7 @@ export class Home extends Component<any, HomeState> {
showCommunity
showContext
enableDownvotes={enableDownvotes(this.state.siteRes)}
allLanguages={this.state.siteRes.all_languages}
/>
);
}