diff --git a/website/src/theme/Navbar/Logo/index.js b/website/src/theme/Navbar/Logo/index.js index 0ab73ab1715..d85776fb19c 100644 --- a/website/src/theme/Navbar/Logo/index.js +++ b/website/src/theme/Navbar/Logo/index.js @@ -1,13 +1,11 @@ import React from 'react'; import Logo from '@theme/Logo'; -import BrowserOnly from '@docusaurus/BrowserOnly'; +import useIsBrowser from '@docusaurus/useIsBrowser'; export default function NavbarLogo() { - + const isBrowser = useIsBrowser(); // if embedded in an iframe, do not show the logo - - {() => { if (window.location !== window.parent.location) return null; }} - + if (isBrowser && typeof window !== 'undefined' && window.self !== window.top) return null; return (