1 import { Component } from 'inferno';
2 import { PostForm } from './post-form';
4 export class CreatePost extends Component<any, any> {
6 constructor(props: any, context: any) {
8 this.handlePostCreate = this.handlePostCreate.bind(this);
12 document.title = "Create Post - Lemmy";
17 <div class="container">
19 <div class="col-12 col-lg-6 mb-4">
20 <h5>Create a Post</h5>
21 <PostForm onCreate={this.handlePostCreate}/>
28 handlePostCreate(id: number) {
29 this.props.history.push(`/post/${id}`);