-
Notifications
You must be signed in to change notification settings - Fork 0
/
gatsby-browser.js
52 lines (42 loc) · 1.31 KB
/
gatsby-browser.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/**
* Implement Gatsby's Browser APIs in this file.
*
* See: https://www.gatsbyjs.org/docs/browser-apis/
*/
// You can delete this file if you're not using it
// custom typeface
import "typeface-source-sans-pro"
import "typeface-righteous"
import "normalize.css"
import "./src/styles/global.css"
require("prismjs/themes/prism-twilight.css")
require("prismjs/plugins/line-numbers/prism-line-numbers.css")
export const onClientEntry = () => {
// IntersectionObserver polyfill for gatsby-background-image (Safari, IE)
if (!(`IntersectionObserver` in window)) {
import(`intersection-observer`)
console.info(`# IntersectionObserver is polyfilled!`)
}
}
export function onServiceWorkerUpdateReady() {
// window.location.reload(true)
window.location.href = window.location.href
}
// export const onInitialClientRender = () => {
// console.log("onInitialClientRender")
// }
// export const onPostPrefetchPathname = () => {
// console.log("onPostPrefetchPathname")
// }
// export const onPreRouteUpdate = () => {
// console.log("onPreRouteUpdate")
// }
// export const onPrefetchPathname = () => {
// console.log("onPrefetchPathname")
// }
// export const onRouteUpdate = () => {
// console.log("onRouteUpdate")
// }
// export const onRouteUpdateDelayed = () => {
// console.log("onRouteUpdateDelayed")
// }