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