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 { Inbox } from './components/inbox';
17 import { Search } from './components/search';
18 import { Symbols } from './components/symbols';
20 import './css/bootstrap.min.css';
21 import './css/main.css';
23 import { WebSocketService, UserService } from './services';
25 const container = document.getElementById('app');
27 class Index extends Component<any, any> {
29 constructor(props: any, context: any) {
30 super(props, context);
31 WebSocketService.Instance;
39 <div class="mt-3 p-0">
41 <Route exact path="/all" component={Home} />
42 <Route exact path="/" component={Home} />
43 <Route path={`/login`} component={Login} />
44 <Route path={`/create_post`} component={CreatePost} />
45 <Route path={`/create_community`} component={CreateCommunity} />
46 <Route path={`/communities`} component={Communities} />
47 <Route path={`/post/:id/comment/:comment_id`} component={Post} />
48 <Route path={`/post/:id`} component={Post} />
49 <Route path={`/community/:id`} component={Community} />
50 <Route path={`/user/:id/:heading`} component={User} />
51 <Route path={`/user/:id`} component={User} />
52 <Route path={`/inbox`} component={Inbox} />
53 <Route path={`/modlog/community/:community_id`} component={Modlog} />
54 <Route path={`/modlog`} component={Modlog} />
55 <Route path={`/setup`} component={Setup} />
56 <Route path={`/search`} component={Search} />
67 render(<Index />, container);