diff --git a/packages/dnb-design-system-portal/gatsby-browser.tsx b/packages/dnb-design-system-portal/gatsby-browser.tsx index c422cb4dfa4..10aca13036f 100644 --- a/packages/dnb-design-system-portal/gatsby-browser.tsx +++ b/packages/dnb-design-system-portal/gatsby-browser.tsx @@ -5,8 +5,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) @@ -19,15 +17,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()