1 import { Component } from 'inferno';
2 import { CommunityForm } from './community-form';
3 import { Community } from '../interfaces';
4 import { WebSocketService } from '../services';
5 import { i18n } from '../i18next';
7 export class CreateCommunity extends Component<any, any> {
8 constructor(props: any, context: any) {
10 this.handleCommunityCreate = this.handleCommunityCreate.bind(this);
14 document.title = `${i18n.t('create_community')} - ${
15 WebSocketService.Instance.site.name
21 <div class="container">
23 <div class="col-12 col-lg-6 offset-lg-3 mb-4">
24 <h5>{i18n.t('create_community')}</h5>
25 <CommunityForm onCreate={this.handleCommunityCreate} />
32 handleCommunityCreate(community: Community) {
33 this.props.history.push(`/c/${community.name}`);