From e3b82d9e56ce751890357f87ce03e88a32d1e749 Mon Sep 17 00:00:00 2001 From: michaeljguarino Date: Tue, 3 Sep 2024 20:49:25 -0400 Subject: [PATCH] deprecate some growthbook code --- www/src/components/Plural.tsx | 25 ------------------- .../marketplace/MarketplaceRepositories.tsx | 4 +-- .../sections/cloud/CloudCredentials.tsx | 8 +----- 3 files changed, 2 insertions(+), 35 deletions(-) diff --git a/www/src/components/Plural.tsx b/www/src/components/Plural.tsx index 0857ee7c2..e97fbb4f1 100644 --- a/www/src/components/Plural.tsx +++ b/www/src/components/Plural.tsx @@ -270,30 +270,6 @@ function OAuthOrFallback() { ) } -function TestBanner() { - const [enable, setEnable] = useState(true) - - useEffect(() => { - const timeout = setTimeout(() => setEnable(false), 5000) - - return () => clearTimeout(timeout) - }, []) - - if (growthbook.isOn('growthbook-test') && enable) { - return ( - - Growthbook Test! - - ) - } - - return null -} - export function PluralInner() { return ( @@ -304,7 +280,6 @@ export function PluralInner() { - {/* --- OAUTH --- */} {/* TODO: Enable if route will be used by the app */} diff --git a/www/src/components/marketplace/MarketplaceRepositories.tsx b/www/src/components/marketplace/MarketplaceRepositories.tsx index fa40c8cfa..82db36417 100644 --- a/www/src/components/marketplace/MarketplaceRepositories.tsx +++ b/www/src/components/marketplace/MarketplaceRepositories.tsx @@ -17,8 +17,6 @@ import orderBy from 'lodash/orderBy' import { upperFirst } from 'lodash' -import { growthbook } from '../../helpers/growthbook' - import { ResponsiveLayoutSidecarContainer } from '../utils/layout/ResponsiveLayoutSidecarContainer' import { ResponsiveLayoutSpacer } from '../utils/layout/ResponsiveLayoutSpacer' @@ -109,7 +107,7 @@ function MarketplaceRepositories({ publisher }: { publisher?: any }) { const isFiltered = !isEmpty(categories) || !isEmpty(tags) const isFilteredOrSearched = isFiltered || search - const shouldRenderStacks = growthbook.isOn('stacks') && !isFilteredOrSearched + const shouldRenderStacks = !isFilteredOrSearched useEffect(() => { const { current } = scrollRef diff --git a/www/src/components/shell/onboarding/sections/cloud/CloudCredentials.tsx b/www/src/components/shell/onboarding/sections/cloud/CloudCredentials.tsx index 2621e831e..d5741875c 100644 --- a/www/src/components/shell/onboarding/sections/cloud/CloudCredentials.tsx +++ b/www/src/components/shell/onboarding/sections/cloud/CloudCredentials.tsx @@ -2,14 +2,12 @@ import { useContext, useEffect, useState } from 'react' import { FormField, ListBoxItem, Select } from '@pluralsh/design-system' -import { growthbook } from '../../../../../helpers/growthbook' import { CloudProvider, CloudProviderDisplayName } from '../../context/types' import { OnboardingContext } from '../../context/onboarding' import Provider from './provider/Provider' const CLOUDS = Object.values(CloudProvider) -const GROWTHBOOK_AZURE_CLOUD_KEY = 'azure-cloud-shell' interface ProviderItem { key: string @@ -21,11 +19,7 @@ function CloudCredentials() { const [provider, setProvider] = useState( cloud?.provider || CloudProvider.AWS ) - const providers = ( - growthbook.isOn(GROWTHBOOK_AZURE_CLOUD_KEY) - ? CLOUDS - : CLOUDS.filter((c) => c !== CloudProvider.Azure) - ).map((c) => ({ + const providers = CLOUDS.map((c) => ({ key: c, label: CloudProviderDisplayName[c], }))