Passed
Push — feature/full-redesign ( 222e47...b7fc7d )
by Kevin Van
04:46
created

src/Gatsby/CreatePages.tsx   A

Complexity

Total Complexity 4
Complexity/F 0

Size

Lines of Code 18
Function Count 0

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 4
eloc 13
mnd 4
bc 4
fnc 0
dl 0
loc 18
rs 10
bpm 0
cpm 0
noi 0
c 0
b 0
f 0
1
import { Actions } from "gatsby"
2
3
export const createArticles = (
4
  list: Queries.node__articleEdge[],
5
  createPage: Actions["createPage"],
6
  template: string
7
) => {
8
  list.forEach(({ node }) => {
9
    createPage({
10
      path: node?.path?.alias || ``,
11
      component: template,
12
      context: {
13
        slug: node?.path?.alias || ``,
14
      },
15
    })
16
  })
17
}
18