2019-03-23 01:42:57 +00:00
|
|
|
import { Component, linkEvent } from 'inferno';
|
2019-04-04 22:29:14 +00:00
|
|
|
import { CommunityForm } from './community-form';
|
2019-03-23 01:42:57 +00:00
|
|
|
|
2019-04-04 22:29:14 +00:00
|
|
|
export class CreateCommunity extends Component<any, any> {
|
2019-03-26 18:00:18 +00:00
|
|
|
|
2019-03-23 01:42:57 +00:00
|
|
|
constructor(props, context) {
|
|
|
|
super(props, context);
|
2019-04-04 22:29:14 +00:00
|
|
|
this.handleCommunityCreate = this.handleCommunityCreate.bind(this);
|
2019-03-23 01:42:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<div class="container">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-12 col-lg-6 mb-4">
|
2019-04-04 22:29:14 +00:00
|
|
|
<h3>Create Forum</h3>
|
|
|
|
<CommunityForm onCreate={this.handleCommunityCreate}/>
|
2019-03-23 01:42:57 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2019-04-04 22:29:14 +00:00
|
|
|
handleCommunityCreate(id: number) {
|
|
|
|
this.props.history.push(`/community/${id}`);
|
2019-03-23 01:42:57 +00:00
|
|
|
}
|
2019-04-04 22:29:14 +00:00
|
|
|
}
|
2019-03-23 01:42:57 +00:00
|
|
|
|
|
|
|
|