Skip to content

Commit

Permalink
wrapRootElement
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinerousseau committed Jul 2, 2020
1 parent 9337807 commit d9c3a2e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions gatsby-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
*/

exports.onClientEntry = require("./src/gatsby/onClientEntry").default
exports.wrapRootElement = require("./src/layout/root").default
exports.wrapPageElement = require("./src/layout/page").default
1 change: 1 addition & 0 deletions gatsby-ssr.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
*/

exports.onRenderBody = require("./src/gatsby/onRenderBody").default
exports.wrapRootElement = require("./src/layout/root").default
exports.wrapPageElement = require("./src/layout/page").default
4 changes: 2 additions & 2 deletions src/gatsby/wrapRootElement.tsx → src/layout/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import type { GatsbyBrowser } from "gatsby"

// import React from "react"

const wrapRootElement: GatsbyBrowser["wrapRootElement"] = ({ element }) => {
const Root: GatsbyBrowser["wrapRootElement"] = ({ element }) => {
// https://www.gatsbyjs.org/docs/browser-apis/#wrapRootElement
return element
}

export default wrapRootElement
export default Root

0 comments on commit d9c3a2e

Please sign in to comment.