diff --git a/gatsby-ssr.js b/gatsby-ssr.js index 52f911a0f..d10246883 100644 --- a/gatsby-ssr.js +++ b/gatsby-ssr.js @@ -5,12 +5,14 @@ import { renderToString } from 'react-dom/server'; import { theme } from './src/theme/docsTheme'; import EuclidCircularASemiBold from './src/styles/fonts/EuclidCircularA-Semibold-WebXL.woff'; import redirectBasedOnLang from './src/utils/head-scripts/redirect-based-on-lang'; -import { getHtmlLangFormat } from './src/utils/locale'; -import bindTabUI from './src/utils/head-scripts/offline-ui/tabs'; +import { OFFLINE_HEAD_SCRIPTS } from './src/utils/head-scripts/offline-ui'; import { isOfflineDocsBuild } from './src/utils/is-offline-docs-build'; -import updateSidenavHeight from './src/utils/head-scripts/offline-ui/sidenav'; +import { getHtmlLangFormat } from './src/utils/locale'; export const onRenderBody = ({ setHeadComponents, setHtmlAttributes }) => { + if (isOfflineDocsBuild) { + return setHeadComponents([...OFFLINE_HEAD_SCRIPTS]); + } const headComponents = [ // GTM Pathway