-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-browser.js
57 lines (50 loc) · 1.56 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
53
54
55
56
57
// custom fontsource
// import "fontsource-noto-serif-jp/400.css"
// import "fontsource-noto-serif-jp/500.css"
// import "fontsource-noto-serif-jp/700.css"
// import "fontsource-noto-serif-jp/900.css"
// import "fontsource-noto-sans-jp/400.css"
// import "fontsource-noto-sans-jp/500.css"
// import "fontsource-noto-sans-jp/700.css"
// import "fontsource-noto-sans-jp/900.css"
// import "fontsource-jost/400.css"
// import "fontsource-jost/500.css"
// import "fontsource-jost/700.css"
// import "fontsource-jost/900.css"
// custom CSS styles
// Separate up tailwindcss files for fast recompile https://github.com/brianlovin/brian-lovin-next/pull/1193
import "src/styles/tailwind.css"
import * as React from 'react'
import Layout from 'src/components/Layout'
import { Provider } from "jotai"
import { MDXProvider } from "@mdx-js/react"
import { YouTube } from 'mdx-embed'
const components = {
YouTube,
}
import onClientEntry from 'src/gatsby/browser/onClientEntry'
import onInitialClientRender from 'src/gatsby/browser/onInitialClientRender'
import onRouteUpdate from 'src/gatsby/browser/onRouteUpdate'
import shouldUpdateScroll from 'src/gatsby/browser/shouldUpdateScroll'
const wrapPageElement = ({ element, props }) => {
return (
<Layout {...props}>{element}</Layout>
)
}
const wrapRootElement = ({ element }) => {
return (
<MDXProvider components={components}>
<Provider>
{element}
</Provider>
</MDXProvider>
)
}
export {
onClientEntry,
onInitialClientRender,
onRouteUpdate,
shouldUpdateScroll,
wrapPageElement,
wrapRootElement
}