Skip to content

Commit

Permalink
Remove: adding [...] dynamic page routes makes onCreatePage not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
MTraveller committed Oct 23, 2022
1 parent 9dab71f commit 1cad5f5
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions gatsby-node.js
Original file line number Diff line number Diff line change
@@ -1,15 +0,0 @@
// Tutorial from: https://www.gatsbyjs.com/tutorial/authentication-tutorial/#creating-client-only-routes
// Implement the Gatsby API “onCreatePage”. This is
// called after every page is created.
exports.onCreatePage = async ({ page, actions }) => {
const { createPage } = actions;

// page.matchPath is a special key that's used for matching pages
// only on the client.
if (page.path.match(/^\/profile/)) {
page.matchPath = '/profile/*';

// Update the page.
createPage(page);
}
};

0 comments on commit 1cad5f5

Please sign in to comment.