From 5f2f3903e93b6a64743c38fead16eaaa14788c4e Mon Sep 17 00:00:00 2001 From: Cameron Dutro Date: Tue, 6 Jun 2023 15:43:49 -0700 Subject: [PATCH] Wrap root node with SSRProvider (#586) * Wrap root node with SSRProvider * Add changeset --- .changeset/six-rings-smile.md | 5 +++++ theme/src/components/wrap-root-element.js | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 .changeset/six-rings-smile.md diff --git a/.changeset/six-rings-smile.md b/.changeset/six-rings-smile.md new file mode 100644 index 00000000..8bf14a7b --- /dev/null +++ b/.changeset/six-rings-smile.md @@ -0,0 +1,5 @@ +--- +'@primer/gatsby-theme-doctocat': patch +--- + +Wrap root node with an SSRProvider diff --git a/theme/src/components/wrap-root-element.js b/theme/src/components/wrap-root-element.js index 900479e9..6f80d873 100644 --- a/theme/src/components/wrap-root-element.js +++ b/theme/src/components/wrap-root-element.js @@ -1,3 +1,4 @@ +import {SSRProvider} from '@react-aria/ssr' import {MDXProvider} from '@mdx-js/react' import {ThemeProvider} from '@primer/react' import Link from './link' @@ -52,9 +53,11 @@ const components = { function wrapRootElement({element}) { return ( - - {element} - + + + {element} + + ) }