From 5b266d4bad6f892afb94b4c8cc509f15f0b2c864 Mon Sep 17 00:00:00 2001 From: Ola Date: Thu, 9 Dec 2021 09:31:13 +0100 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20onRenderBody=20into=20gatsby-browser?= =?UTF-8?q?=20=F0=9F=98=BA=F0=9F=91=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gatsby-browser.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gatsby-browser.js b/gatsby-browser.js index c0ff776..6bfda6f 100644 --- a/gatsby-browser.js +++ b/gatsby-browser.js @@ -1,6 +1,7 @@ import React from 'react'; import Layout from './src/components/Layout'; +import { onRenderBody } from "./gatsby-ssr"; export function wrapPageElement({ element, props }) { - return {element}; + return {onRenderBody, element}; } \ No newline at end of file From 0ecdf3dd574709380272b9b96c17aa979bf126af Mon Sep 17 00:00:00 2001 From: Ola Date: Thu, 9 Dec 2021 09:39:27 +0100 Subject: [PATCH 2/2] fix: gatsby-ssr --- gatsby-ssr.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gatsby-ssr.js b/gatsby-ssr.js index 1c1ccf7..6853b2c 100644 --- a/gatsby-ssr.js +++ b/gatsby-ssr.js @@ -1,5 +1,6 @@ // gatsby-ssr.js import React from "react"; +import Layout from "./src/components/Layout"; const OusetaScriptComponent = () => { return ( @@ -36,4 +37,8 @@ const onRenderBody = ({ setHeadComponents }) => { return setHeadComponents([OusetaConfigComponent(), OusetaScriptComponent()]); }; -export { onRenderBody }; + +export function wrapPageElement({ element, props }) { + return {onRenderBody, element}; +} +