2018-11-07 16:13:20 +01:00
|
|
|
// import global branding styles
|
|
|
|
import './src/styles/global.scss'
|
2018-11-07 12:24:53 +01:00
|
|
|
|
2018-11-07 16:13:20 +01:00
|
|
|
// IntersectionObserver polyfill for gatsby-image (Safari, IE)
|
|
|
|
if (typeof window.IntersectionObserver === 'undefined') {
|
2020-07-01 11:24:21 +02:00
|
|
|
// eslint-disable-next-line no-unused-expressions
|
|
|
|
import('intersection-observer')
|
2018-11-07 16:13:20 +01:00
|
|
|
}
|
2019-11-20 13:58:21 +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 = () => {
|
2020-07-01 11:24:21 +02:00
|
|
|
const answer = window.confirm(
|
|
|
|
'This application has been updated. ' +
|
|
|
|
'Reload to display the latest version?'
|
|
|
|
)
|
|
|
|
if (answer === true) {
|
|
|
|
window.location.reload()
|
|
|
|
}
|
2019-11-20 13:58:21 +01:00
|
|
|
}
|