From 7093d04ef4da08e93c01dc06d9bd418d68e78986 Mon Sep 17 00:00:00 2001 From: sebastienlorber Date: Thu, 24 Aug 2023 19:20:28 +0200 Subject: [PATCH] Add data-has-hydrated attribute --- packages/docusaurus/src/client/App.tsx | 2 +- packages/docusaurus/src/client/hasHydratedDataAttribute.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/docusaurus/src/client/App.tsx b/packages/docusaurus/src/client/App.tsx index a5ebd4e60640..3a93ec6524a8 100644 --- a/packages/docusaurus/src/client/App.tsx +++ b/packages/docusaurus/src/client/App.tsx @@ -23,7 +23,7 @@ import SiteMetadataDefaults from './SiteMetadataDefaults'; // TODO, quick fix for CSS insertion order // eslint-disable-next-line import/order import ErrorBoundary from '@docusaurus/ErrorBoundary'; -import {HasHydratedDataAttribute} from './hasHydratedDataAttribute'; +import HasHydratedDataAttribute from './hasHydratedDataAttribute'; export default function App(): JSX.Element { const routeElement = renderRoutes(routes); diff --git a/packages/docusaurus/src/client/hasHydratedDataAttribute.tsx b/packages/docusaurus/src/client/hasHydratedDataAttribute.tsx index 1cb1f5d7142a..1855f059775e 100644 --- a/packages/docusaurus/src/client/hasHydratedDataAttribute.tsx +++ b/packages/docusaurus/src/client/hasHydratedDataAttribute.tsx @@ -11,7 +11,7 @@ import useIsBrowser from '@docusaurus/useIsBrowser'; // See https://github.com/facebook/docusaurus/pull/9256 // Docusaurus adds a after hydration -export function HasHydratedDataAttribute(): JSX.Element { +export default function HasHydratedDataAttribute(): JSX.Element { const isBrowser = useIsBrowser(); return (