X-Git-Url: http://these/git/?a=blobdiff_plain;f=src%2Fshared%2Fcomponents%2Fcommunity.tsx;h=9f492cd35c92a7ce9b190806be0a1874881ce664;hb=e02075d52d5c6adb45169b0db472b5b8d317a9e2;hp=ef5c7833d85a126f297c7e5d10d2c5fb1495f312;hpb=cc215fe99f66257373b7ad178cec0457d1214ecd;p=lemmy-ui.git diff --git a/src/shared/components/community.tsx b/src/shared/components/community.tsx index ef5c783..9f492cd 100644 --- a/src/shared/components/community.tsx +++ b/src/shared/components/community.tsx @@ -19,8 +19,6 @@ import { GetCommentsResponse, CommentResponse, GetSiteResponse, - Category, - ListCategoriesResponse, } from "lemmy-js-client"; import { UserService, WebSocketService } from "../services"; import { PostListings } from "./post-listings"; @@ -72,7 +70,6 @@ interface State { dataType: DataType; sort: SortType; page: number; - categories: Category[]; } interface CommunityProps { @@ -103,7 +100,6 @@ export class Community extends Component { sort: getSortTypeFromProps(this.props), page: getPageFromProps(this.props), siteRes: this.isoData.site_res, - categories: [], }; constructor(props: any, context: any) { @@ -124,14 +120,12 @@ export class Community extends Component { } else { this.state.comments = this.isoData.routeData[1].comments; } - this.state.categories = this.isoData.routeData[2].categories; this.state.communityLoading = false; this.state.postsLoading = false; this.state.commentsLoading = false; } else { this.fetchCommunity(); this.fetchData(); - WebSocketService.Instance.send(wsClient.listCategories()); } setupTippy(); } @@ -211,8 +205,6 @@ export class Community extends Component { promises.push(req.client.getComments(getCommentsForm)); } - promises.push(req.client.listCategories()); - return promises; } @@ -268,7 +260,6 @@ export class Community extends Component { admins={this.state.siteRes.admins} online={this.state.communityRes.online} enableNsfw={this.state.siteRes.site_view.site.enable_nsfw} - categories={this.state.categories} /> @@ -541,10 +532,6 @@ export class Community extends Component { let data = wsJsonToRes(msg).data; createCommentLikeRes(data.comment_view, this.state.comments); this.setState(this.state); - } else if (op == UserOperation.ListCategories) { - let data = wsJsonToRes(msg).data; - this.state.categories = data.categories; - this.setState(this.state); } } }