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);
13 <div class="container">
15 <div class="col-12 col-lg-6 mb-4">
16 <h5>Create a Post</h5>
17 <PostForm onCreate={this.handlePostCreate}/>
24 handlePostCreate(id: number) {
25 this.props.history.push(`/post/${id}`);