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';
12 import { User } from './components/user';
13 import { Modlog } from './components/modlog';
14 import { Symbols } from './components/symbols';
18 import { WebSocketService, UserService } from './services';
20 const container = document.getElementById('app');
22 class Index extends Component<any, any> {
24 constructor(props: any, context: any) {
25 super(props, context);
26 WebSocketService.Instance;
34 <div class="mt-3 p-0">
36 <Route exact path="/" component={Home} />
37 <Route path={`/login`} component={Login} />
38 <Route path={`/create_post`} component={CreatePost} />
39 <Route path={`/create_community`} component={CreateCommunity} />
40 <Route path={`/communities`} component={Communities} />
41 <Route path={`/post/:id/comment/:comment_id`} component={Post} />
42 <Route path={`/post/:id`} component={Post} />
43 <Route path={`/community/:id`} component={Community} />
44 <Route path={`/user/:id/:heading`} component={User} />
45 <Route path={`/user/:id`} component={User} />
46 <Route path={`/modlog`} component={Modlog} />
56 render(<Index />, container);