1 import { Component } from 'inferno';
2 import { CommunityForm } from './community-form';
3 import { Community } from '../interfaces';
4 import { WebSocketService } from '../services';
6 export class CreateCommunity extends Component<any, any> {
8 constructor(props: any, context: any) {
10 this.handleCommunityCreate = this.handleCommunityCreate.bind(this);
14 document.title = `Create Community - ${WebSocketService.Instance.site.name}`;
19 <div class="container">
21 <div class="col-12 col-lg-6 mb-4">
22 <h5>Create Community</h5>
23 <CommunityForm onCreate={this.handleCommunityCreate}/>
30 handleCommunityCreate(community: Community) {
31 this.props.history.push(`/c/${community.name}`);