Skip to content

Commit

Permalink
deprecate some growthbook code
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljguarino committed Sep 4, 2024
1 parent 6dfaecd commit e3b82d9
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 35 deletions.
25 changes: 0 additions & 25 deletions www/src/components/Plural.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<Toast
severity="success"
marginBottom="medium"
marginRight="xxxxlarge"
>
Growthbook Test!
</Toast>
)
}

return null
}

export function PluralInner() {
return (
<WrapStripe>
Expand All @@ -304,7 +280,6 @@ export function PluralInner() {
<LegacyExpirationNotice />
<VerifyEmailConfirmed />
<DeviceLoginNotif />
<TestBanner />
<Routes>
{/* --- OAUTH --- */}
{/* TODO: Enable if route will be used by the app */}
Expand Down
4 changes: 1 addition & 3 deletions www/src/components/marketplace/MarketplaceRepositories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -21,11 +19,7 @@ function CloudCredentials() {
const [provider, setProvider] = useState<CloudProvider>(
cloud?.provider || CloudProvider.AWS
)
const providers = (
growthbook.isOn(GROWTHBOOK_AZURE_CLOUD_KEY)
? CLOUDS
: CLOUDS.filter((c) => c !== CloudProvider.Azure)
).map<ProviderItem>((c) => ({
const providers = CLOUDS.map<ProviderItem>((c) => ({
key: c,
label: CloudProviderDisplayName[c],
}))
Expand Down

0 comments on commit e3b82d9

Please sign in to comment.