1 import { Component, linkEvent } from 'inferno';
2 import { PostForm } from './post-form';
4 export class CreatePost extends Component<any, any> {
6 constructor(props, context) {
8 this.handlePostCreate = this.handlePostCreate.bind(this);
13 <div class="container">
15 <div class="col-12 col-lg-6 mb-4">
16 <h3>Create a Post</h3>
17 <PostForm onCreate={this.handlePostCreate}/>
24 handlePostCreate(id: number) {
25 this.props.history.push(`/post/${id}`);