Files
freeCodeCamp/client/src/components/Intro/research-banner.tsx
T
Ahmad Abdolsaheb 0df7ee430d feat(client): add growthbook (#48003)
* feat: initial set up

* feat: useFeature setup

* feat: adjust attributes

* chore(client): remove ts-disables in growth-book-wrapper

* feat: pull growthbook uri from env

* feat: adjust the staff atribute

* feat: make linter happy

* feat: update recruitment message

* refactor: simplify types

* chore: delete unused config

* fix: update copy

* fix: add growthbookUri to expected env vars

Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2022-10-17 14:53:25 +02:00

32 lines
1000 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import React from 'react';
import { Alert, Button } from '@freecodecamp/react-bootstrap';
import { useFeature } from '@growthbook/growthbook-react';
const ResearchBannerx = (): JSX.Element | null => {
const feature = useFeature('show-research-recruitment-alert');
return feature.on ? (
<Alert>
<p>
<b>Launching Oct 19</b>: freeCodeCamp is teaming up with researchers
from Stanford and UPenn to study how to help people build strong coding
habits.
</p>
<p style={{ marginBottom: 20, marginTop: 14 }}>
Would you like to get involved? Youll get free coaching from our
scientists.
</p>
<div style={{ display: 'flex', justifyContent: 'center' }}>
<Button
href={'https://wharton.qualtrics.com/jfe/form/SV_57rJfXROkQDDU2y'}
>
Learn about HabitLab
</Button>
</div>
</Alert>
) : null;
};
ResearchBannerx.displayName = 'ResearchBannerx';
export default ResearchBannerx;