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';
12 import { WebSocketService, UserService } from './services';
14 const container = document.getElementById('app');
16 class Index extends Component<any, any> {
18 constructor(props, context) {
19 super(props, context);
20 WebSocketService.Instance;
28 <div class="mt-3 p-0">
30 <Route exact path="/" component={Home} />
31 <Route path={`/login`} component={Login} />
32 <Route path={`/create_post`} component={CreatePost} />
33 <Route path={`/create_community`} component={CreateCommunity} />
35 <Route path={`/search/:type_/:q/:page`} component={Search} />
36 <Route path={`/submit`} component={Submit} />
37 <Route path={`/user/:id`} component={Login} />
38 <Route path={`/community/:id`} component={Login} />
47 render(<Index />, container);