Changing page context

This commit is contained in:
Andre Cabrera
2020-07-06 05:52:46 -03:00
parent c29bac5af7
commit b813b1e79c
4 changed files with 4 additions and 10 deletions
+2 -2
View File
@@ -17,11 +17,11 @@ exports.onCreateWebpackConfig = ({ stage, actions, getConfig }) => {
}
}
exports.createPages = async ({ actions }) => {
console.log('Creating pages');
exports.createPages = async ({ actions }, themeOptions) => {
const basePath = "/"
actions.createPage({
path: basePath,
component: require.resolve("./src/pages/index.js"),
context: { menuComponents: themeOptions.menuComponents }
})
}
+1 -1
View File
@@ -1,5 +1,5 @@
{
"name": "@alcipir/gatsby-ipfs-web-wallet",
"name": "gatsby-ipfs-web-wallet-testing",
"description": "A gatsbyjs app with adminlte2 integration and basic Bitcoin Cash wallet functionality.",
"version": "1.0.1",
"main": "index.js",
Binary file not shown.
+1 -7
View File
@@ -29,12 +29,6 @@ let ConnectedDashboard = AdminLTE
: null
class AdminLTEPage extends React.Component {
state = {}
render() {
return <>{ConnectedDashboard && <ConnectedDashboard />}</>
}
}
const AdminLTEPage = ({ pageContext }) => <>{ConnectedDashboard && <ConnectedDashboard menuComponents={pageContext.menuComponents} />}</>
export default AdminLTEPage