forked from resource-watch/resource-watch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
routes.js
40 lines (31 loc) · 1.61 KB
/
routes.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// routes.js
const nextRoutes = require('next-routes');
const routes = module.exports = nextRoutes();
// ========================= ADMIN ROUTES =====================
routes.add('admin_home', '/admin', 'admin/Data');
// DATA
routes.add('admin_data', '/admin/data/:tab?', 'admin/Data');
routes.add('admin_data_detail', '/admin/data/:tab/:id/:subtab?', 'admin/DataDetail');
// PARTNERS
routes.add('admin_partners', '/admin/partners/:tab?/:subtab?', 'admin/partners');
// PAGES
routes.add('admin_pages', '/admin/pages/:tab?/:subtab?', 'admin/Pages');
routes.add('admin_pages_detail', '/admin/pages/:tab/:id/:subtab?', 'admin/PagesDetail');
// USERS
routes.add('admin_users', '/admin/users/:tab?/:subtab?', 'admin/users');
// ========================= APP ROUTES =====================
routes.add('home', '/home', 'app/Home');
routes.add('about', '/about', 'app/About');
routes.add('about_partners', '/about_partners', 'app/Partners');
routes.add('partner', '/about/partners/:id', 'app/PartnerDetail');
routes.add('data', '/data', 'app/Explore'); // TODO: create the data page
routes.add('explore', '/explore', 'app/Explore');
routes.add('explore_detail', '/explore/:id', 'app/ExploreDetail');
routes.add('pulse', '/pulse', 'app/Pulse');
routes.add('dashboards', '/dashboards/:slug?', 'app/Dashboards');
routes.add('insights', '/insights', 'app/Home'); // TODO: create the insights page
// ----- GET INVOLVED -----
routes.add('get_involved', '/get-involved', 'app/GetInvolved');
routes.add('get_involved_detail', '/get-involved/:id', 'app/GetInvolvedDetail');
// ------ MY RW ------------
routes.add('myrw', '/myrw/:tab?/:subtab?', 'app/MyRW');