1 import { Component, linkEvent } from 'inferno';
3 import { LoginForm, PostForm, UserOperation } from '../interfaces';
4 import { WebSocketService, UserService } from '../services';
5 import { msgOp } from '../utils';
11 let emptyState: State = {
19 export class CreatePost extends Component<any, State> {
21 constructor(props, context) {
22 super(props, context);
24 this.state = emptyState;
26 WebSocketService.Instance.subject.subscribe(
27 (msg) => this.parseMessage(msg),
28 (err) => console.error(err),
29 () => console.log('complete')
36 <div class="container">
38 <div class="col-12 col-lg-6 mb-4">
40 {/* {this.postForm()} */}
47 parseMessage(msg: any) {
49 let op: UserOperation = msgOp(msg);