]> Untitled Git - lemmy.git/blob - ui/src/components/create-community.tsx
Adding document titles.
[lemmy.git] / ui / src / components / create-community.tsx
1 import { Component } from 'inferno';
2 import { CommunityForm } from './community-form';
3
4 export class CreateCommunity extends Component<any, any> {
5
6   constructor(props: any, context: any) {
7     super(props, context);
8     this.handleCommunityCreate = this.handleCommunityCreate.bind(this);
9   }
10
11   componentDidMount() {
12     document.title = "Create Forum - Lemmy";
13   }
14
15   render() {
16     return (
17       <div class="container">
18         <div class="row">
19           <div class="col-12 col-lg-6 mb-4">
20             <h5>Create Forum</h5>
21             <CommunityForm onCreate={this.handleCommunityCreate}/>
22           </div>
23         </div>
24       </div>
25     )
26   }
27
28   handleCommunityCreate(id: number) {
29     this.props.history.push(`/community/${id}`);
30   }
31 }
32
33