1 import { render, Component } from 'inferno';
2 import { HashRouter, Route, Switch } from 'inferno-router';
4 import { Navbar } from './components/navbar';
5 import { Home } from './components/home';
6 import { Login } from './components/login';
7 import { CreatePost } from './components/create-post';
8 import { CreateCommunity } from './components/create-community';
9 import { Post } from './components/post';
10 import { Community } from './components/community';
14 import { WebSocketService, UserService } from './services';
16 const container = document.getElementById('app');
18 class Index extends Component<any, any> {
20 constructor(props, context) {
21 super(props, context);
22 WebSocketService.Instance;
30 <div class="mt-3 p-0">
32 <Route exact path="/" component={Home} />
33 <Route path={`/login`} component={Login} />
34 <Route path={`/create_post`} component={CreatePost} />
35 <Route path={`/create_community`} component={CreateCommunity} />
36 <Route path={`/post/:id`} component={Post} />
37 <Route path={`/community/:id`} component={Community} />
45 render(<Index />, container);