2021-03-04 01:20:39 +01:00
|
|
|
import './src/global/global.css'
|
2021-05-23 13:38:15 +02:00
|
|
|
import './src/global/imports.css'
|
2018-07-18 00:24:11 +02:00
|
|
|
|
2019-11-17 23:56:29 +01:00
|
|
|
import wrapPageElementWithLayout from './src/helpers/wrapPageElement'
|
|
|
|
export const wrapPageElement = wrapPageElementWithLayout
|
|
|
|
|
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 = () => {
|
2020-05-23 13:38:02 +02:00
|
|
|
const div = document.createElement('div')
|
|
|
|
div.id = 'toast'
|
|
|
|
div.classList.add('alert', 'alert-info')
|
|
|
|
div.innerHTML = `<button onClick="window.location.reload()">This application has been updated. <span>Click to Reload</span>.</button>`
|
|
|
|
document.body.append(div)
|
2019-11-09 20:08:57 +01:00
|
|
|
}
|