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