Skip to content

Commit e6ed034

Browse files
authored
fix: GB request hanging (freeCodeCamp#61359)
1 parent 6e723cf commit e6ed034

File tree

1 file changed

+7
-23
lines changed

1 file changed

+7
-23
lines changed

client/src/pages/index.tsx

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import React from 'react';
22
import { useTranslation } from 'react-i18next';
3-
import { useGrowthBook } from '@growthbook/growthbook-react';
43
import SEO from '../components/seo';
5-
import { Loader } from '../components/helpers';
64
import LandingTopB from '../components/landing/components/landing-top-b';
75
import LandingTop from '../components/landing/components/landing-top';
86
import Testimonials from '../components/landing/components/testimonials';
@@ -27,27 +25,13 @@ const Landing = ({ showLandingPageRedesign }: LandingProps) => (
2725

2826
function IndexPage(): JSX.Element {
2927
const { t } = useTranslation();
30-
const growthbook = useGrowthBook();
31-
if (growthbook && growthbook.ready) {
32-
const showLandingPageRedesign = growthbook.getFeatureValue(
33-
'landing-top-skill-focused',
34-
false
35-
);
36-
growthbook.getFeatureValue('landing-aa-test', false);
37-
return (
38-
<>
39-
<SEO title={t('metaTags:title')} />
40-
<Landing showLandingPageRedesign={showLandingPageRedesign} />
41-
</>
42-
);
43-
} else {
44-
return (
45-
<>
46-
<SEO title={t('metaTags:title')} />
47-
<Loader fullScreen={true} />
48-
</>
49-
);
50-
}
28+
29+
return (
30+
<>
31+
<SEO title={t('metaTags:title')} />
32+
<Landing showLandingPageRedesign={true} />
33+
</>
34+
);
5135
}
5236

5337
IndexPage.displayName = 'IndexPage';

0 commit comments

Comments
 (0)