forked from kernel-community/kernel-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gatsby-browser.js
32 lines (27 loc) · 1.01 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
import React from 'react'
import { TranslationProvider } from '@modules/localization'
import Layout from '@modules/layouts/site_layout'
import { NavigationProvider } from '@modules/navigation'
import NotificationProvider from '@modules/notifications/context'
import { Provider, createClient } from 'wagmi'
import { connectors, provider, connectorStorageKey } from '@src/honour/connect'
//Load our Primsjs css and Fonts
import '@modules/layouts/global.css' //<- Load in Prismjs css. Our custom styles have to be loaded this way cause Prismjs is blackboxed from our own code.
const client = createClient({
autoConnect: true,
connectors,
provider,
connectorStorageKey,
})
export const wrapRootElement = ({ element }) => (
<TranslationProvider>
<Provider client={client}>{element}</Provider>
</TranslationProvider>
)
export const wrapPageElement = ({ element, props }) => (
<NavigationProvider>
<NotificationProvider>
<Layout {...props}>{element}</Layout>
</NotificationProvider>
</NavigationProvider>
)