1 import { render, Component } from 'inferno';
2 import { BrowserRouter, Route, Switch } from 'inferno-router';
3 import { Provider } from 'inferno-i18next';
4 import { Main } from './components/main';
5 import Navbar from './components/navbar';
6 import { Footer } from './components/footer';
7 import { Login } from './components/login';
8 import { CreatePost } from './components/create-post';
9 import { CreateCommunity } from './components/create-community';
10 import { CreatePrivateMessage } from './components/create-private-message';
11 import { PasswordChange } from './components/password_change';
12 import { Post } from './components/post';
13 import { Community } from './components/community';
14 import { Communities } from './components/communities';
15 import { User } from './components/user';
16 import { Modlog } from './components/modlog';
17 import { Setup } from './components/setup';
18 import { AdminSettings } from './components/admin-settings';
19 import { Inbox } from './components/inbox';
20 import { Search } from './components/search';
21 import { Sponsors } from './components/sponsors';
22 import { Symbols } from './components/symbols';
23 import { i18n } from './i18next';
25 const container = document.getElementById('app');
27 class Index extends Component<any, any> {
28 constructor(props: any, context: any) {
29 super(props, context);
34 <Provider i18next={i18n}>
38 <div class="mt-4 p-0 fl-1">
40 <Route exact path={`/`} component={Main} />
42 path={`/home/data_type/:data_type/listing_type/:listing_type/sort/:sort/page/:page`}
45 <Route path={`/login`} component={Login} />
46 <Route path={`/create_post`} component={CreatePost} />
47 <Route path={`/create_community`} component={CreateCommunity} />
49 path={`/create_private_message`}
50 component={CreatePrivateMessage}
53 path={`/communities/page/:page`}
54 component={Communities}
56 <Route path={`/communities`} component={Communities} />
58 path={`/post/:id/comment/:comment_id`}
61 <Route path={`/post/:id`} component={Post} />
63 path={`/c/:name/data_type/:data_type/sort/:sort/page/:page`}
66 <Route path={`/community/:id`} component={Community} />
67 <Route path={`/c/:name`} component={Community} />
69 path={`/u/:username/view/:view/sort/:sort/page/:page`}
72 <Route path={`/user/:id`} component={User} />
73 <Route path={`/u/:username`} component={User} />
74 <Route path={`/inbox`} component={Inbox} />
76 path={`/modlog/community/:community_id`}
79 <Route path={`/modlog`} component={Modlog} />
80 <Route path={`/setup`} component={Setup} />
81 <Route path={`/admin`} component={AdminSettings} />
83 path={`/search/q/:q/type/:type/sort/:sort/page/:page`}
86 <Route path={`/search`} component={Search} />
87 <Route path={`/sponsors`} component={Sponsors} />
89 path={`/password_change/:token`}
90 component={PasswordChange}
103 render(<Index />, container);