diff options
author | Dessalines <tyhou13@gmx.com> | 2019-03-26 11:00:18 -0700 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2019-03-26 11:00:18 -0700 |
commit | 25dcb8f4f4f80e401d1d3154923e2dcd05664c76 (patch) | |
tree | 85e9644b64e0eb3fa139db18075dbfd73f854a38 /ui/src/components/create-community.tsx | |
parent | e1cb805cfc719d6266ec50e5f1ef3ac1edf74656 (diff) |
Adding a few endpoints.
- Adding CreatePost, CreateComment, CreateCommunity
Diffstat (limited to 'ui/src/components/create-community.tsx')
-rw-r--r-- | ui/src/components/create-community.tsx | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/ui/src/components/create-community.tsx b/ui/src/components/create-community.tsx index 159147b6..0a0edae6 100644 --- a/ui/src/components/create-community.tsx +++ b/ui/src/components/create-community.tsx @@ -11,20 +11,20 @@ interface State { communityForm: CommunityForm; } -let emptyState: State = { - communityForm: { - name: null, - } -} - export class CreateCommunity extends Component<any, State> { private subscription: Subscription; + private emptyState: State = { + communityForm: { + name: null, + } + } + constructor(props, context) { super(props, context); - this.state = emptyState; - + this.state = this.emptyState; + this.subscription = WebSocketService.Instance.subject .pipe(retryWhen(errors => errors.pipe(delay(3000), take(10)))) .subscribe( @@ -89,7 +89,8 @@ export class CreateCommunity extends Component<any, State> { return; } else { if (op == UserOperation.CreateCommunity) { - let community: Community = msg.data; + let community: Community = msg.community; + this.props.history.push(`/community/${community.id}`); } } } |