diff --git a/frontend/src/scenes/onboarding/Onboarding.tsx b/frontend/src/scenes/onboarding/Onboarding.tsx index 1940085873012..0dc78e6eaaf47 100644 --- a/frontend/src/scenes/onboarding/Onboarding.tsx +++ b/frontend/src/scenes/onboarding/Onboarding.tsx @@ -10,7 +10,6 @@ import { AvailableFeature, ProductKey } from '~/types' import { OnboardingBillingStep } from './OnboardingBillingStep' import { OnboardingInviteTeammates } from './OnboardingInviteTeammates' import { onboardingLogic, OnboardingStepKey } from './onboardingLogic' -import { OnboardingOtherProductsStep } from './OnboardingOtherProductsStep' import { OnboardingProductConfiguration } from './OnboardingProductConfiguration' import { ProductConfigOption } from './onboardingProductConfigurationLogic' import { OnboardingVerificationStep } from './OnboardingVerificationStep' @@ -29,7 +28,7 @@ export const scene: SceneExport = { * Wrapper for custom onboarding content. This automatically includes billing, other products, and invite steps. */ const OnboardingWrapper = ({ children }: { children: React.ReactNode }): JSX.Element => { - const { currentOnboardingStep, shouldShowBillingStep, shouldShowOtherProductsStep } = useValues(onboardingLogic) + const { currentOnboardingStep, shouldShowBillingStep } = useValues(onboardingLogic) const { setAllOnboardingSteps } = useActions(onboardingLogic) const { product } = useValues(onboardingLogic) const [allSteps, setAllSteps] = useState([]) @@ -60,10 +59,6 @@ const OnboardingWrapper = ({ children }: { children: React.ReactNode }): JSX.Ele const BillingStep = steps = [...steps, BillingStep] } - if (shouldShowOtherProductsStep) { - const OtherProductsStep = - steps = [...steps, OtherProductsStep] - } const inviteTeammatesStep = steps = [...steps, inviteTeammatesStep] setAllSteps(steps) diff --git a/frontend/src/scenes/onboarding/OnboardingOtherProductsStep.tsx b/frontend/src/scenes/onboarding/OnboardingOtherProductsStep.tsx deleted file mode 100644 index caac1d4f6cc0a..0000000000000 --- a/frontend/src/scenes/onboarding/OnboardingOtherProductsStep.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import { useActions, useValues } from 'kea' -import { useWindowSize } from 'lib/hooks/useWindowSize' -import { ProductCard } from 'scenes/products/Products' - -import { onboardingLogic, OnboardingStepKey } from './onboardingLogic' -import { OnboardingStep } from './OnboardingStep' - -export const OnboardingOtherProductsStep = ({ - stepKey = OnboardingStepKey.OTHER_PRODUCTS, -}: { - stepKey?: OnboardingStepKey -}): JSX.Element => { - const { product, suggestedProducts } = useValues(onboardingLogic) - const { completeOnboarding } = useActions(onboardingLogic) - const { width } = useWindowSize() - const horizontalCard = width && width >= 640 - - return ( - } - stepKey={stepKey} - > -
- {suggestedProducts?.map((suggestedProduct) => ( - completeOnboarding(suggestedProduct.type)} - orientation={horizontalCard ? 'horizontal' : 'vertical'} - className="w-full" - /> - ))} -
-
- ) -} diff --git a/frontend/src/scenes/onboarding/onboardingLogic.tsx b/frontend/src/scenes/onboarding/onboardingLogic.tsx index f6d46eee16751..d714491a5fc48 100644 --- a/frontend/src/scenes/onboarding/onboardingLogic.tsx +++ b/frontend/src/scenes/onboarding/onboardingLogic.tsx @@ -143,22 +143,6 @@ export const onboardingLogic = kea([ return !product?.subscribed || !hasAllAddons || subscribedDuringOnboarding }, ], - shouldShowOtherProductsStep: [ - (s) => [s.suggestedProducts, s.isFirstProductOnboarding], - (suggestedProducts: BillingProductV2Type[], isFirstProductOnboarding: boolean) => - suggestedProducts.length > 0 && isFirstProductOnboarding, - ], - suggestedProducts: [ - (s) => [s.billing, s.product, s.currentTeam], - (billing, product, currentTeam) => - billing?.products?.filter( - (p) => - p.type !== product?.type && - !p.contact_support && - !p.inclusion_only && - !currentTeam?.has_completed_onboarding_for?.[p.type] - ) || [], - ], isStepKeyInvalid: [ (s) => [s.stepKey, s.allOnboardingSteps, s.currentOnboardingStep], (stepKey: string, allOnboardingSteps: AllOnboardingSteps, currentOnboardingStep: React.ReactNode | null) =>