Total Complexity | 6 |
Complexity/F | 1 |
Lines of Code | 48 |
Function Count | 6 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | const createTeams = (list, createPage, template) => { |
||
2 | list.forEach(({ node }) => { |
||
3 | createPage({ |
||
4 | path: node.path.alias, |
||
5 | component: template, |
||
6 | context: { |
||
7 | slug: node.path.alias, |
||
8 | }, |
||
9 | }) |
||
10 | }) |
||
11 | } |
||
12 | |||
13 | const createPlayers = (list, createPage, template, shareTemplate) => { |
||
14 | list.forEach(({ node }) => { |
||
15 | createPage({ |
||
16 | path: node.path.alias, |
||
17 | component: template, |
||
18 | context: { |
||
19 | slug: node.path.alias, |
||
20 | }, |
||
21 | }) |
||
22 | createPage({ |
||
23 | path: `${node.path.alias}/share`, |
||
24 | component: shareTemplate, |
||
25 | context: { |
||
26 | slug: node.path.alias, |
||
27 | }, |
||
28 | }) |
||
29 | }) |
||
30 | } |
||
31 | |||
32 | const createStaff = (list, createPage, template) => { |
||
33 | list.forEach(({ node }) => { |
||
34 | createPage({ |
||
35 | path: node.path.alias, |
||
36 | component: template, |
||
37 | context: { |
||
38 | slug: node.path.alias, |
||
39 | }, |
||
40 | }) |
||
41 | }) |
||
42 | } |
||
43 | |||
44 | module.exports = { |
||
45 | createTeams, |
||
46 | createPlayers, |
||
47 | createStaff, |
||
48 | } |
||
49 |