Add Intelligems Provider

The IntelligemsGatsbyProvider component stores Intelligems data in React Context so hooks and components can access it throughout your app.

Example Configuration

circle-exclamation
import { IntelligemsGatsbyProvider } from "@intelligems/headless/gatsby"

export default function MyApp({ Component, pageProps }: AppProps) {
  return (
    <>
      <IntelligemsGatsbyProvider
         organizationId={process.env.GATSBY_INTELLIGEMS_ORG_ID}
         storefrontApiToken={process.env.GATSBY_STOREFRONT_ACCESS_TOKEN}
         activeCurrencyCode="USD"
         antiFlicker={true}
      >
        ...
      </IntelligemsGatsbyProvider>
    </>
  )
}

Last updated