From d38b6fa1a64182698f6fdb09c95da256278a0dc2 Mon Sep 17 00:00:00 2001 From: Raquel Smith Date: Thu, 14 Mar 2024 12:35:31 -0700 Subject: [PATCH] fix: don't show pricing section on unlicensed product intro (#20914) don't show pricing section on unlicensed product intro --- .../OnboardingProductIntroduction.tsx | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/frontend/src/scenes/onboarding/OnboardingProductIntroduction.tsx b/frontend/src/scenes/onboarding/OnboardingProductIntroduction.tsx index 235c0e76599..5402f8fe7d7 100644 --- a/frontend/src/scenes/onboarding/OnboardingProductIntroduction.tsx +++ b/frontend/src/scenes/onboarding/OnboardingProductIntroduction.tsx @@ -8,6 +8,7 @@ import React from 'react' import { convertLargeNumberToWords } from 'scenes/billing/billing-utils' import { billingProductLogic } from 'scenes/billing/billingProductLogic' import { ProductPricingModal } from 'scenes/billing/ProductPricingModal' +import { preflightLogic } from 'scenes/PreflightCheck/preflightLogic' import { getProductIcon } from 'scenes/products/Products' import { userLogic } from 'scenes/userLogic' @@ -150,7 +151,7 @@ const PricingSection = ({ product }: { product: BillingProductV2Type }): JSX.Ele {convertLargeNumberToWords( currentAndUpgradePlans.currentPlan?.free_allocation || - currentAndUpgradePlans.downgradePlan.free_allocation || + currentAndUpgradePlans.downgradePlan?.free_allocation || 0, null )}{' '} @@ -183,6 +184,7 @@ const PricingSection = ({ product }: { product: BillingProductV2Type }): JSX.Ele export function OnboardingProductIntroduction({ stepKey }: { stepKey: OnboardingStepKey }): JSX.Element | null { const { product } = useValues(onboardingLogic) + const { isCloudOrDev } = useValues(preflightLogic) const websiteSlug: Partial> = { [ProductKey.SESSION_REPLAY]: 'session-replay', [ProductKey.FEATURE_FLAGS]: 'feature-flags', @@ -223,8 +225,8 @@ export function OnboardingProductIntroduction({ stepKey }: { stepKey: Onboarding

Features

    - {product.features - .filter((feature) => feature.type == 'primary') + {product?.features + ?.filter((feature) => feature.type == 'primary') .map((feature, i) => { return ( @@ -276,11 +278,13 @@ export function OnboardingProductIntroduction({ stepKey }: { stepKey: Onboarding
-
-
- + {isCloudOrDev && ( +
+
+ +
-
+ )}