-
Notifications
You must be signed in to change notification settings - Fork 0
/
static.config.js
66 lines (59 loc) · 1.4 KB
/
static.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
54
55
56
57
58
59
60
61
62
63
64
65
66
import {Document} from './src/components/Document'
import majors from './src/core/majors'
import questions from './src/core/questions'
const majorRoutes = majors.map(major => ({
path: '/' + major,
component: 'src/pages/major'
}))
const steps = [1, 2, 3]
const formRoutes = majors
.map(major =>
steps.map(step => ({
path: '/' + major + '/step' + step,
component: 'src/pages/step' + step
}))
)
.reduce((prev, cur) => [...prev, ...cur])
const verifyRoutes = majors.map(major => ({
path: '/' + major + '/verify',
component: 'src/pages/verify'
}))
const majorQuestionRoutes = majors.map(major => ({
path: '/' + major + '/step4',
component: 'src/pages/step4',
getData: () => ({questions: questions[major]})
}))
export default {
siteRoot: 'https://join.ycc.in.th',
Document,
plugins: [
'react-static-plugin-emotion',
['react-static-plugin-typescript', {typeCheck: false}],
'react-static-plugin-sass'
],
getSiteData: () => ({
title: "Young Creator's Camp"
}),
getRoutes: () => [
{
path: '/',
component: 'src/pages/index'
},
...majorRoutes,
...formRoutes,
...verifyRoutes,
...majorQuestionRoutes,
{
path: '/thankyou',
component: 'src/pages/thankyou'
},
{
path: '/change_denied',
component: 'src/pages/change_denied'
},
{
path: '404',
component: 'src/pages/404'
}
]
}