Skip to content

Commit

Permalink
chore: remove other products step (#20243)
Browse files Browse the repository at this point in the history
remove other products step
  • Loading branch information
raquelmsmith authored Feb 13, 2024
1 parent a9ca9c2 commit 81a1473
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 61 deletions.
7 changes: 1 addition & 6 deletions frontend/src/scenes/onboarding/Onboarding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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<JSX.Element[]>([])
Expand Down Expand Up @@ -60,10 +59,6 @@ const OnboardingWrapper = ({ children }: { children: React.ReactNode }): JSX.Ele
const BillingStep = <OnboardingBillingStep product={product} stepKey={OnboardingStepKey.BILLING} />
steps = [...steps, BillingStep]
}
if (shouldShowOtherProductsStep) {
const OtherProductsStep = <OnboardingOtherProductsStep stepKey={OnboardingStepKey.OTHER_PRODUCTS} />
steps = [...steps, OtherProductsStep]
}
const inviteTeammatesStep = <OnboardingInviteTeammates stepKey={OnboardingStepKey.INVITE_TEAMMATES} />
steps = [...steps, inviteTeammatesStep]
setAllSteps(steps)
Expand Down
39 changes: 0 additions & 39 deletions frontend/src/scenes/onboarding/OnboardingOtherProductsStep.tsx

This file was deleted.

16 changes: 0 additions & 16 deletions frontend/src/scenes/onboarding/onboardingLogic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,22 +143,6 @@ export const onboardingLogic = kea<onboardingLogicType>([
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) =>
Expand Down

0 comments on commit 81a1473

Please sign in to comment.