1 import { BrowserRouter, Route, Switch } from 'inferno-router';
2 import { IRouteProps } from 'inferno-router/dist/Route';
3 import { Main } from './components/main';
4 import { Navbar } from './components/navbar';
5 import { Footer } from './components/footer';
6 import { Login } from './components/login';
7 import { CreatePost } from './components/create-post';
8 import { CreateCommunity } from './components/create-community';
9 import { CreatePrivateMessage } from './components/create-private-message';
10 import { PasswordChange } from './components/password_change';
11 import { Post } from './components/post';
12 import { Community } from './components/community';
13 import { Communities } from './components/communities';
14 import { User } from './components/user';
15 import { Modlog } from './components/modlog';
16 import { Setup } from './components/setup';
17 import { AdminSettings } from './components/admin-settings';
18 import { Inbox } from './components/inbox';
19 import { Search } from './components/search';
20 import { Sponsors } from './components/sponsors';
21 import { Instances } from './components/instances';
23 export const routes: IRouteProps[] = [
24 { exact: true, path: `/`, component: Main },
26 path: `/home/data_type/:data_type/listing_type/:listing_type/sort/:sort/page/:page`,
29 { path: `/login`, component: Login },
30 { path: `/create_post`, component: CreatePost },
31 { path: `/create_community`, component: CreateCommunity },
33 path: `/create_private_message`,
34 component: CreatePrivateMessage,
37 path: `/communities/page/:page`,
38 component: Communities,
40 { path: `/communities`, component: Communities },
42 path: `/post/:id/comment/:comment_id`,
45 { path: `/post/:id`, component: Post },
47 path: `/c/:name/data_type/:data_type/sort/:sort/page/:page`,
50 { path: `/community/:id`, component: Community },
51 { path: `/c/:name`, component: Community },
53 path: `/u/:username/view/:view/sort/:sort/page/:page`,
56 { path: `/user/:id`, component: User },
57 { path: `/u/:username`, component: User },
58 { path: `/inbox`, component: Inbox },
60 path: `/modlog/community/:community_id`,
63 { path: `/modlog`, component: Modlog },
64 { path: `/setup`, component: Setup },
65 { path: `/admin`, component: AdminSettings },
67 path: `/search/q/:q/type/:type/sort/:sort/page/:page`,
70 { path: `/search`, component: Search },
71 { path: `/sponsors`, component: Sponsors },
73 path: `/password_change/:token`,
74 component: PasswordChange,
76 { path: `/instances`, component: Instances },