2018-09-24 01:09:50 +02:00
|
|
|
import './src/styles/global.scss'
|
2018-07-18 00:24:11 +02:00
|
|
|
|
2018-09-24 01:09:50 +02:00
|
|
|
// IntersectionObserver polyfill for gatsby-image (Safari, IE)
|
|
|
|
if (typeof window.IntersectionObserver === 'undefined') {
|
|
|
|
import('intersection-observer')
|
2018-07-18 00:24:11 +02:00
|
|
|
}
|
2019-11-09 20:08:57 +01:00
|
|
|
|
|
|
|
// Display a message when a service worker updates
|
|
|
|
// https://www.gatsbyjs.org/docs/add-offline-support-with-a-service-worker/#displaying-a-message-when-a-service-worker-updates
|
|
|
|
export const onServiceWorkerUpdateReady = () => {
|
|
|
|
const answer = window.confirm(
|
|
|
|
`This application has been updated. ` +
|
|
|
|
`Reload to display the latest version?`
|
|
|
|
)
|
|
|
|
if (answer === true) {
|
|
|
|
window.location.reload()
|
|
|
|
}
|
|
|
|
}
|