-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-browser.js
34 lines (33 loc) · 1.17 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
import { MedusaProvider } from "medusa-react"
import React from "react"
import "./src/assets/styles/emoji-picker.css"
import "./src/assets/styles/global.css"
import { LayeredModalProvider } from "./src/components/molecules/modal/layered-modal"
import { SteppedProvider } from "./src/components/molecules/modal/stepped-modal"
import { AccountProvider } from "./src/context/account"
import { CacheProvider } from "./src/context/cache"
import { InterfaceProvider } from "./src/context/interface"
import { FeatureFlagProvider } from "./src/context/feature-flag"
import { medusaUrl, queryClient } from "./src/services/config"
export const wrapPageElement = ({ element }) => {
return (
<MedusaProvider
baseUrl={medusaUrl}
queryClientProviderProps={{
client: queryClient,
}}
>
<CacheProvider>
<AccountProvider>
<FeatureFlagProvider>
<InterfaceProvider>
<SteppedProvider>
<LayeredModalProvider>{element}</LayeredModalProvider>
</SteppedProvider>
</InterfaceProvider>
</FeatureFlagProvider>
</AccountProvider>
</CacheProvider>
</MedusaProvider>
)
}