Skip to content

Commit

Permalink
chore: removes replaceHydrationFunction
Browse files Browse the repository at this point in the history
  • Loading branch information
langz committed Jun 13, 2024
1 parent 62b23e8 commit f429be3
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions packages/dnb-design-system-portal/gatsby-browser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import { applyPageFocus } from '@dnb/eufemia/src/shared/helpers'
import { rootElement, pageElement } from './src/core/PortalProviders'
import { scrollToHash } from '@dnb/eufemia/src/components/Anchor'
import ReactDOM from 'react-dom/client'

if (typeof window !== 'undefined') {
setIsTest(window.location)
Expand All @@ -19,15 +18,6 @@ function setIsTest(location) {
}
}

export const replaceHydrateFunction = () => {
// Added to solve the following errors, which prevented us from running screenshot tests
// https://github.com/gatsbyjs/gatsby/discussions/36232
return (element: React.ReactElement, container: HTMLElement) => {
const root = ReactDOM.createRoot(container)
root.render(element)
}
}

export const wrapRootElement = rootElement('browser')
export const wrapPageElement = pageElement()

Expand Down

0 comments on commit f429be3

Please sign in to comment.