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>
This commit is contained in:
Ahmad Abdolsaheb
2022-10-17 15:53:25 +03:00
committed by GitHub
parent 060826f70b
commit 0df7ee430d
10 changed files with 160 additions and 5 deletions
+3 -1
View File
@@ -52,12 +52,14 @@ if (FREECODECAMP_NODE_ENV !== 'development') {
const searchKeys = ['algoliaAppId', 'algoliaAPIKey'];
const donationKeys = ['stripePublicKey', 'paypalClientId', 'patreonClientId'];
const loggingKeys = ['sentryClientDSN'];
const abTestingKeys = ['growthbookUri'];
const expectedVariables = locationKeys.concat(
deploymentKeys,
searchKeys,
donationKeys,
loggingKeys
loggingKeys,
abTestingKeys
);
const actualVariables = Object.keys(env as Record<string, unknown>);
if (expectedVariables.length !== actualVariables.length) {