mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-05 14:00:41 -05:00
fix: GB request hanging (#61359)
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user