fix: GB request hanging (#61359)

This commit is contained in:
Tom
2025-07-15 16:20:55 -05:00
committed by GitHub
parent 6e723cff1d
commit e6ed034a77

View File

@@ -1,8 +1,6 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
import { useGrowthBook } from '@growthbook/growthbook-react';
import SEO from '../components/seo';
import { Loader } from '../components/helpers';
import LandingTopB from '../components/landing/components/landing-top-b';
import LandingTop from '../components/landing/components/landing-top';
import Testimonials from '../components/landing/components/testimonials';
@@ -27,27 +25,13 @@ const Landing = ({ showLandingPageRedesign }: LandingProps) => (
function IndexPage(): JSX.Element {
const { t } = useTranslation();
const growthbook = useGrowthBook();
if (growthbook && growthbook.ready) {
const showLandingPageRedesign = growthbook.getFeatureValue(
'landing-top-skill-focused',
false
);
growthbook.getFeatureValue('landing-aa-test', false);
return (
<>
<SEO title={t('metaTags:title')} />
<Landing showLandingPageRedesign={showLandingPageRedesign} />
</>
);
} else {
return (
<>
<SEO title={t('metaTags:title')} />
<Loader fullScreen={true} />
</>
);
}
return (
<>
<SEO title={t('metaTags:title')} />
<Landing showLandingPageRedesign={true} />
</>
);
}
IndexPage.displayName = 'IndexPage';