Rename boundActionCreators to actions

This commit is contained in:
mottox2 2018-06-18 20:45:24 +09:00
parent e53f847eef
commit 8122ad3f7a

View file

@ -3,8 +3,8 @@ const Promise = require('bluebird')
const path = require('path') const path = require('path')
const { createFilePath } = require('gatsby-source-filesystem') const { createFilePath } = require('gatsby-source-filesystem')
exports.createPages = ({ graphql, boundActionCreators }) => { exports.createPages = ({ graphql, actions }) => {
const { createPage } = boundActionCreators const { createPage } = actions
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const blogPost = path.resolve('./src/templates/blog-post.js') const blogPost = path.resolve('./src/templates/blog-post.js')
@ -54,8 +54,8 @@ exports.createPages = ({ graphql, boundActionCreators }) => {
}) })
} }
exports.onCreateNode = ({ node, boundActionCreators, getNode }) => { exports.onCreateNode = ({ node, actions, getNode }) => {
const { createNodeField } = boundActionCreators const { createNodeField } = actions
if (node.internal.type === `MarkdownRemark`) { if (node.internal.type === `MarkdownRemark`) {
const value = createFilePath({ node, getNode }) const value = createFilePath({ node, getNode })