From fefc8d2e8892a68c2feb0eb3d8cb20c1077c3df8 Mon Sep 17 00:00:00 2001 From: Bianca Yang <21014901+xrdt@users.noreply.github.com> Date: Mon, 18 Mar 2024 17:15:21 -0700 Subject: [PATCH] feat: remove ff code for where to redirect people after onboarding to pa. (#20990) remove ff code --- .../src/scenes/onboarding/onboardingLogic.tsx | 18 +++++++----------- frontend/src/scenes/products/Products.tsx | 4 +--- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/frontend/src/scenes/onboarding/onboardingLogic.tsx b/frontend/src/scenes/onboarding/onboardingLogic.tsx index f6b597b74414a..8857c73b7fe42 100644 --- a/frontend/src/scenes/onboarding/onboardingLogic.tsx +++ b/frontend/src/scenes/onboarding/onboardingLogic.tsx @@ -1,7 +1,6 @@ import { actions, connect, kea, listeners, path, props, reducers, selectors } from 'kea' -import { actionToUrl, combineUrl, router, urlToAction } from 'kea-router' -import { FEATURE_FLAGS } from 'lib/constants' -import { featureFlagLogic, FeatureFlagsSet } from 'lib/logic/featureFlagLogic' +import { actionToUrl, router, urlToAction } from 'kea-router' +import { featureFlagLogic } from 'lib/logic/featureFlagLogic' import { eventUsageLogic } from 'lib/utils/eventUsageLogic' import { billingLogic } from 'scenes/billing/billingLogic' import { preflightLogic } from 'scenes/PreflightCheck/preflightLogic' @@ -62,13 +61,10 @@ export const stepKeyToTitle = (stepKey?: OnboardingStepKey): undefined | string export type AllOnboardingSteps = OnboardingStep[] export type OnboardingStep = JSX.Element -export const getProductUri = (productKey: ProductKey, featureFlags?: FeatureFlagsSet): string => { +export const getProductUri = (productKey: ProductKey): string => { switch (productKey) { case ProductKey.PRODUCT_ANALYTICS: - return featureFlags && - featureFlags[FEATURE_FLAGS.REDIRECT_INSIGHT_CREATION_PRODUCT_ANALYTICS_ONBOARDING] === 'test' - ? urls.insightNew() - : combineUrl(urls.insights(), {}, { panel: 'activation' }).url + return urls.insightNew() case ProductKey.SESSION_REPLAY: return urls.replay() case ProductKey.FEATURE_FLAGS: @@ -168,9 +164,9 @@ export const onboardingLogic = kea([ }, ], onCompleteOnboardingRedirectUrl: [ - (s) => [s.featureFlags, s.productKey], - (featureFlags: FeatureFlagsSet, productKey: string | null) => { - return productKey ? getProductUri(productKey as ProductKey, featureFlags) : urls.default() + (s) => [s.productKey], + (productKey: string | null) => { + return productKey ? getProductUri(productKey as ProductKey) : urls.default() }, ], totalOnboardingSteps: [ diff --git a/frontend/src/scenes/products/Products.tsx b/frontend/src/scenes/products/Products.tsx index c1f7311425a05..0a37ab2c57b8e 100644 --- a/frontend/src/scenes/products/Products.tsx +++ b/frontend/src/scenes/products/Products.tsx @@ -5,7 +5,6 @@ import { useActions, useValues } from 'kea' import { router } from 'kea-router' import { LemonCard } from 'lib/lemon-ui/LemonCard/LemonCard' import { Spinner } from 'lib/lemon-ui/Spinner' -import { featureFlagLogic } from 'lib/logic/featureFlagLogic' import { eventUsageLogic } from 'lib/utils/eventUsageLogic' import { billingLogic } from 'scenes/billing/billingLogic' import { getProductUri, onboardingLogic } from 'scenes/onboarding/onboardingLogic' @@ -44,7 +43,6 @@ export function ProductCard({ className?: string }): JSX.Element { const { currentTeam } = useValues(teamLogic) - const { featureFlags } = useValues(featureFlagLogic) const { setIncludeIntro } = useActions(onboardingLogic) const { user } = useValues(userLogic) const { reportOnboardingProductSelected } = useActions(eventUsageLogic) @@ -77,7 +75,7 @@ export function ProductCard({ className="relative" onClick={(e) => { e.stopPropagation() - router.actions.push(getProductUri(product.type as ProductKey, featureFlags)) + router.actions.push(getProductUri(product.type as ProductKey)) }} >