/

Use with Gatsby


Update your gatsby-browser.js to look like this:

// /gatsby-browser.js
const React = require('react')
const { ThemeProvider, theme } = require('insites-ui')

export const wrapRootElement = ({ element }) => {
  return <ThemeProvider theme={theme}>{element}</ThemeProvider>
}

And your gatsby-ssr.js to look like this:

// /gatsby-ssr.js
export { wrapRootElement } from './gatsby-browser'
Edit on GitHub