Skip to content

Commit

Permalink
Remove lang-based redirect for now (#1133)
Browse files Browse the repository at this point in the history
  • Loading branch information
rayangler committed Jun 14, 2024
1 parent 42aaed6 commit b14d25f
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions gatsby-ssr.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { renderStylesToString } from '@leafygreen-ui/emotion';
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 redirectBasedOnLang from './src/utils/head-scripts/redirect-based-on-lang';

export const onRenderBody = ({ setHeadComponents }) => {
const headComponents = [
Expand All @@ -24,14 +24,15 @@ export const onRenderBody = ({ setHeadComponents }) => {
__html: `!function(e,t,r,n){if(!e[n]){for(var a=e[n]=[],i=["survey","reset","config","init","set","get","event","identify","track","page","screen","group","alias"],s=0;s<i.length;s++){var c=i[s];a[c]=a[c]||function(e){return function(){var t=Array.prototype.slice.call(arguments);a.push([e,t])}}(c)}a.SNIPPET_VERSION="1.0.1";var o=t.createElement("script");o.type="text/javascript",o.async=!0,o.src="https://d2yyd1h5u9mauk.cloudfront.net/integrations/web/v1/library/"+r+"/"+n+".js";var l=t.getElementsByTagName("script")[0];l.parentNode.insertBefore(o,l)}}(window,document,"Dk30CC86ba0nATlK","delighted");`,
}}
/>,
<script
key="browser-lang-redirect"
type="text/javascript"
dangerouslySetInnerHTML={{
// Call function immediately on load
__html: `!${redirectBasedOnLang}()`,
}}
/>,
// Disabling language-based redirects for now until locale selector is present in top nav (DOP-4715)
// <script
// key="browser-lang-redirect"
// type="text/javascript"
// dangerouslySetInnerHTML={{
// // Call function immediately on load
// __html: `!${redirectBasedOnLang}()`,
// }}
// />,
<link
rel="preload"
href={EuclidCircularASemiBold}
Expand Down

0 comments on commit b14d25f

Please sign in to comment.