-
Notifications
You must be signed in to change notification settings - Fork 9
/
next.config.js
53 lines (52 loc) · 1.25 KB
/
next.config.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
41
42
43
44
45
46
47
48
49
50
51
52
53
const withOffline = require("next-offline");
module.exports = withOffline();
const events = [
"cyberquest",
"electromania",
"aerodynamix",
"genesis",
"mechrocosm",
"nirmaan",
"powersurge",
"rasayans",
"robomania",
"oligopoly",
"monopoly",
"kreedomania"
];
const tabs = [
"dashboard",
"profile",
"register",
"soloevents",
"teamevents",
"bankaccountinfo",
"faq"
];
const routes = {
"/": { page: "/" },
"/team": { page: "/team" },
"/events": { page: "/events" },
"/auth": { page: "/auth" },
"/dashboard": { page: "/dashboard" },
"/store": { page: "/store" },
"/reset-password": { page: "/reset-password" },
"/reset-password/email": { page: "/reset-password", query: { tab: "email" } },
"/reset-password/code": { page: "/reset-password", query: { tab: "code" } },
"/gnosiomania": { page: "/gnosiomania" },
"/workshops": { page: "/workshops" },
"/sponsors": { page: "/sponsors" }
};
events.forEach(function(event) {
const path = "/events/" + event;
routes[path] = { page: "/events", query: { name: event } };
});
tabs.forEach(function(tab) {
const path = "/dashboard/" + tab;
routes[path] = { page: "/dashboard", query: { tab: tab } };
});
module.exports = withOffline({
exportPathMap() {
return routes;
}
});