1 import { render, Component } from 'inferno';
2 import { HashRouter, Route, Switch } from 'inferno-router';
4 import { Navbar } from './components/navbar';
5 import { Footer } from './components/footer';
6 import { Home } from './components/home';
7 import { Login } from './components/login';
8 import { CreatePost } from './components/create-post';
9 import { CreateCommunity } from './components/create-community';
10 import { Post } from './components/post';
11 import { Community } from './components/community';
12 import { Communities } from './components/communities';
13 import { User } from './components/user';
14 import { Modlog } from './components/modlog';
15 import { Setup } from './components/setup';
16 import { Symbols } from './components/symbols';
18 import './css/bootstrap.min.css';
19 import './css/main.css';
21 import { WebSocketService, UserService } from './services';
23 const container = document.getElementById('app');
25 class Index extends Component<any, any> {
27 constructor(props: any, context: any) {
28 super(props, context);
29 WebSocketService.Instance;
37 <div class="mt-3 p-0">
39 <Route exact path="/" component={Home} />
40 <Route path={`/login`} component={Login} />
41 <Route path={`/create_post`} component={CreatePost} />
42 <Route path={`/create_community`} component={CreateCommunity} />
43 <Route path={`/communities`} component={Communities} />
44 <Route path={`/post/:id/comment/:comment_id`} component={Post} />
45 <Route path={`/post/:id`} component={Post} />
46 <Route path={`/community/:id`} component={Community} />
47 <Route path={`/user/:id/:heading`} component={User} />
48 <Route path={`/user/:id`} component={User} />
49 <Route path={`/modlog/community/:community_id`} component={Modlog} />
50 <Route path={`/modlog`} component={Modlog} />
51 <Route path={`/setup`} component={Setup} />
62 render(<Index />, container);