Skip to content

Commit

Permalink
Fix issue with wrapRootElement not working by adding same export to g…
Browse files Browse the repository at this point in the history
…atsby-ssr
  • Loading branch information
codytodonnell committed Dec 8, 2023
1 parent 720a3ea commit fe6aa70
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions gatsby-ssr.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from "react";
import { NavigationProvider } from "./src/context/NavigationProvider";
import { GatsbyBrowser } from 'gatsby';

/**
* Wrap the gatsby app in a NavigationProvider so that any component
* in the app can consume this context state.
*/
export const wrapRootElement: GatsbyBrowser['wrapRootElement'] = ({ element }) => (
<NavigationProvider>{element}</NavigationProvider>
);

0 comments on commit fe6aa70

Please sign in to comment.