]> Untitled Git - lemmy-ui.git/blob - src/shared/routes.ts
Partly functioning fuse-box, but moving te webpack now.
[lemmy-ui.git] / src / shared / routes.ts
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';
22
23 export const routes: IRouteProps[] = [
24   { exact: true, path: `/`, component: Main },
25   {
26     path: `/home/data_type/:data_type/listing_type/:listing_type/sort/:sort/page/:page`,
27     component: Main,
28   },
29   { path: `/login`, component: Login },
30   { path: `/create_post`, component: CreatePost },
31   { path: `/create_community`, component: CreateCommunity },
32   {
33     path: `/create_private_message`,
34     component: CreatePrivateMessage,
35   },
36   {
37     path: `/communities/page/:page`,
38     component: Communities,
39   },
40   { path: `/communities`, component: Communities },
41   {
42     path: `/post/:id/comment/:comment_id`,
43     component: Post,
44   },
45   { path: `/post/:id`, component: Post },
46   {
47     path: `/c/:name/data_type/:data_type/sort/:sort/page/:page`,
48     component: Community,
49   },
50   { path: `/community/:id`, component: Community },
51   { path: `/c/:name`, component: Community },
52   {
53     path: `/u/:username/view/:view/sort/:sort/page/:page`,
54     component: User,
55   },
56   { path: `/user/:id`, component: User },
57   { path: `/u/:username`, component: User },
58   { path: `/inbox`, component: Inbox },
59   {
60     path: `/modlog/community/:community_id`,
61     component: Modlog,
62   },
63   { path: `/modlog`, component: Modlog },
64   { path: `/setup`, component: Setup },
65   { path: `/admin`, component: AdminSettings },
66   {
67     path: `/search/q/:q/type/:type/sort/:sort/page/:page`,
68     component: Search,
69   },
70   { path: `/search`, component: Search },
71   { path: `/sponsors`, component: Sponsors },
72   {
73     path: `/password_change/:token`,
74     component: PasswordChange,
75   },
76   { path: `/instances`, component: Instances },
77 ];