Skip to content
This repository has been archived by the owner on Jul 1, 2023. It is now read-only.

Commit

Permalink
fix: wrapPageElement bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ebkn committed Nov 18, 2019
1 parent 649e328 commit 87304d8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions gatsby-browser.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import { ModeContextProvider } from './src/context/mode';
import Layout from './src/layout';

const Layout = require('./src/layout').default;

const firebase = require('firebase/app');
require('firebase/analytics');
Expand Down Expand Up @@ -34,6 +35,6 @@ export const onServiceWorkerUpdateReady = () => {
export const wrapRootElement = ({ element }) => (
<ModeContextProvider>{element}</ModeContextProvider>
);
export const wrapPageElement = ({ element }) => (
<Layout>{element}</Layout>
export const wrapPageElement = ({ element, props }) => (
<Layout {...props}>{element}</Layout>
);

0 comments on commit 87304d8

Please sign in to comment.