From 1cad5f50f1435e525f651eb187fe72b246051f4b Mon Sep 17 00:00:00 2001 From: Mahmoud Tantouri <26313521+MTraveller@users.noreply.github.com> Date: Mon, 24 Oct 2022 00:52:15 +0200 Subject: [PATCH] Remove: adding [...] dynamic page routes makes onCreatePage not needed --- gatsby-node.js | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/gatsby-node.js b/gatsby-node.js index 822adeb..e69de29 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -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); - } -};