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';
11 import { Communities } from './components/communities';
15 import { WebSocketService, UserService } from './services';
17 const container = document.getElementById('app');
19 class Index extends Component<any, any> {
21 constructor(props, context) {
22 super(props, context);
23 WebSocketService.Instance;
31 <div class="mt-3 p-0">
33 <Route exact path="/" component={Home} />
34 <Route path={`/login`} component={Login} />
35 <Route path={`/create_post`} component={CreatePost} />
36 <Route path={`/create_community`} component={CreateCommunity} />
37 <Route path={`/communities`} component={Communities} />
38 <Route path={`/post/:id`} component={Post} />
39 <Route path={`/community/:id`} component={Community} />
47 render(<Index />, container);