mirror of
https://github.com/kremalicious/portfolio.git
synced 2024-12-23 01:29:41 +01:00
19 lines
596 B
JavaScript
19 lines
596 B
JavaScript
import './src/styles/global.scss'
|
|
import React from 'react'
|
|
import AppProvider from './src/store/provider'
|
|
import wrapPageElementWithTransition from './src/helpers/wrapPageElement'
|
|
|
|
// IntersectionObserver polyfill for gatsby-image (Safari, IE)
|
|
if (typeof window !== 'undefined' && !window.IntersectionObserver) {
|
|
import('intersection-observer')
|
|
}
|
|
|
|
// React Context in Browser
|
|
// eslint-disable-next-line
|
|
export const wrapRootElement = ({ element }) => {
|
|
return <AppProvider>{element}</AppProvider>
|
|
}
|
|
|
|
// Page Transitions & Layout
|
|
export const wrapPageElement = wrapPageElementWithTransition
|