summaryrefslogtreecommitdiffstats
path: root/ui/src/components/communities.tsx
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2019-04-07 22:19:02 -0700
committerDessalines <tyhou13@gmx.com>2019-04-07 22:19:02 -0700
commit49bf16e7d451388d894f93a994f3bf18571f9594 (patch)
tree1802bf775a0dd97503670c38ceb13d9aa78d95b6 /ui/src/components/communities.tsx
parenta61516439406b7884e19d9ae8a1875c728bbe628 (diff)
Adding user details / overview page.
- Fixes #19
Diffstat (limited to 'ui/src/components/communities.tsx')
-rw-r--r--ui/src/components/communities.tsx12
1 files changed, 8 insertions, 4 deletions
diff --git a/ui/src/components/communities.tsx b/ui/src/components/communities.tsx
index c3cde177..b81b11cd 100644
--- a/ui/src/components/communities.tsx
+++ b/ui/src/components/communities.tsx
@@ -2,9 +2,9 @@ import { Component, linkEvent } from 'inferno';
import { Link } from 'inferno-router';
import { Subscription } from "rxjs";
import { retryWhen, delay, take } from 'rxjs/operators';
-import { UserOperation, Community, Post as PostI, GetPostResponse, PostResponse, Comment, CommentForm as CommentFormI, CommentResponse, CommentLikeForm, CommentSortType, CreatePostLikeResponse, ListCommunitiesResponse, CommunityResponse, FollowCommunityForm } from '../interfaces';
-import { WebSocketService, UserService } from '../services';
-import { msgOp, hotRank,mdToHtml } from '../utils';
+import { UserOperation, Community, ListCommunitiesResponse, CommunityResponse, FollowCommunityForm } from '../interfaces';
+import { WebSocketService } from '../services';
+import { msgOp } from '../utils';
declare const Sortable: any;
@@ -18,7 +18,7 @@ export class Communities extends Component<any, CommunitiesState> {
communities: []
}
- constructor(props, context) {
+ constructor(props: any, context: any) {
super(props, context);
this.state = this.emptyState;
this.subscription = WebSocketService.Instance.subject
@@ -32,6 +32,10 @@ export class Communities extends Component<any, CommunitiesState> {
}
+ componentWillUnmount() {
+ this.subscription.unsubscribe();
+ }
+
componentDidMount() {
let table = document.querySelector('#community_table');
Sortable.initTable(table);