diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown--dark.png b/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown--dark.png index 5e7e452b9a54b..b1393974dee4a 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown--dark.png and b/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown--dark.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown-edit--dark--webkit.png b/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown-edit--dark--webkit.png index de4b1cc2c7a2b..b926a0c205cd1 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown-edit--dark--webkit.png and b/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown-edit--dark--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown-edit--light--webkit.png b/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown-edit--light--webkit.png index 5132a12e5b880..c2721913f5d9a 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown-edit--light--webkit.png and b/frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown-edit--light--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown--dark.png b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown--dark.png index 6fd194e19ee1c..e4adf75431dfc 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown--dark.png and b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown--dark.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit--dark--webkit.png b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit--dark--webkit.png index f272154a3edec..ce493cf1d8216 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit--dark--webkit.png and b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit--dark--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit--light--webkit.png b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit--light--webkit.png index 751af4e904d96..efe1f3edaf58e 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit--light--webkit.png and b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit--light--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-edit--dark.png b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-edit--dark.png index 6c8fc3fd66b54..1d271c29b1239 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-edit--dark.png and b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-edit--dark.png differ diff --git a/frontend/__snapshots__/scenes-app-pipeline--pipeline-destinations-page--dark.png b/frontend/__snapshots__/scenes-app-pipeline--pipeline-destinations-page--dark.png index c7028ed4eee6d..9b5fc4d54cbdb 100644 Binary files a/frontend/__snapshots__/scenes-app-pipeline--pipeline-destinations-page--dark.png and b/frontend/__snapshots__/scenes-app-pipeline--pipeline-destinations-page--dark.png differ diff --git a/frontend/__snapshots__/scenes-app-pipeline--pipeline-destinations-page--light.png b/frontend/__snapshots__/scenes-app-pipeline--pipeline-destinations-page--light.png index 7540ba0751af0..5661317098fe2 100644 Binary files a/frontend/__snapshots__/scenes-app-pipeline--pipeline-destinations-page--light.png and b/frontend/__snapshots__/scenes-app-pipeline--pipeline-destinations-page--light.png differ diff --git a/frontend/__snapshots__/scenes-app-sidepanels--side-panel-support-with-email--dark.png b/frontend/__snapshots__/scenes-app-sidepanels--side-panel-support-with-email--dark.png index 2e6386dc00522..c168b1737ee87 100644 Binary files a/frontend/__snapshots__/scenes-app-sidepanels--side-panel-support-with-email--dark.png and b/frontend/__snapshots__/scenes-app-sidepanels--side-panel-support-with-email--dark.png differ diff --git a/frontend/__snapshots__/scenes-app-sidepanels--side-panel-support-with-email--light.png b/frontend/__snapshots__/scenes-app-sidepanels--side-panel-support-with-email--light.png index 55273fcb8a55d..70644e18399d3 100644 Binary files a/frontend/__snapshots__/scenes-app-sidepanels--side-panel-support-with-email--light.png and b/frontend/__snapshots__/scenes-app-sidepanels--side-panel-support-with-email--light.png differ diff --git a/frontend/__snapshots__/scenes-other-billing-v2--billing-v-2--dark.png b/frontend/__snapshots__/scenes-other-billing-v2--billing-v-2--dark.png index 142d5b7816f45..d5d8b6fc1da94 100644 Binary files a/frontend/__snapshots__/scenes-other-billing-v2--billing-v-2--dark.png and b/frontend/__snapshots__/scenes-other-billing-v2--billing-v-2--dark.png differ diff --git a/frontend/__snapshots__/scenes-other-billing-v2--billing-v-2--light.png b/frontend/__snapshots__/scenes-other-billing-v2--billing-v-2--light.png index 54eef32ed150f..f96b4045301b8 100644 Binary files a/frontend/__snapshots__/scenes-other-billing-v2--billing-v-2--light.png and b/frontend/__snapshots__/scenes-other-billing-v2--billing-v-2--light.png differ diff --git a/frontend/__snapshots__/scenes-other-settings--settings-organization--dark.png b/frontend/__snapshots__/scenes-other-settings--settings-organization--dark.png index 14e566bde6ca2..69bb41b29d926 100644 Binary files a/frontend/__snapshots__/scenes-other-settings--settings-organization--dark.png and b/frontend/__snapshots__/scenes-other-settings--settings-organization--dark.png differ diff --git a/frontend/src/layout/navigation-3000/sidepanel/panels/SidePanelSupport.tsx b/frontend/src/layout/navigation-3000/sidepanel/panels/SidePanelSupport.tsx index 7cea4611511e9..89877df19b78f 100644 --- a/frontend/src/layout/navigation-3000/sidepanel/panels/SidePanelSupport.tsx +++ b/frontend/src/layout/navigation-3000/sidepanel/panels/SidePanelSupport.tsx @@ -71,13 +71,7 @@ const Section = ({ title, children }: { title: string; children: React.ReactNode } const SupportFormBlock = ({ onCancel }: { onCancel: () => void }): JSX.Element => { - const { billing } = useValues(billingLogic) - - // TODO(@zach): remove after updated plans w/ support levels are shipped - const supportResponseTimes = { - [AvailableFeature.EMAIL_SUPPORT]: '24 hours', - [AvailableFeature.PRIORITY_SUPPORT]: '12 hours', - } + const { supportPlans, hasSupportAddonPlan } = useValues(billingLogic) return (
@@ -90,30 +84,27 @@ const SupportFormBlock = ({ onCancel }: { onCancel: () => void }): JSX.Element = Explore options - {billing?.products - ?.find((product) => product.type == ProductKey.PLATFORM_AND_SUPPORT) - ?.plans?.map((plan) => ( + {supportPlans?.map((plan) => { + // If they have an addon plan, only show the addon plan + const currentPlan = plan.current_plan && (!hasSupportAddonPlan || plan.plan_key?.includes('addon')) + return ( -
+
{plan.name} - {plan.current_plan && ( + {currentPlan && ( <> {' '} (your plan) )}
-
+
{/* TODO(@zach): remove fallback after updated plans w/ support levels are shipped */} - {plan.features.find((f) => f.key == AvailableFeature.SUPPORT_RESPONSE_TIME)?.note ?? - (plan.features.some((f) => f.key == AvailableFeature.PRIORITY_SUPPORT) - ? supportResponseTimes[AvailableFeature.PRIORITY_SUPPORT] - : plan.features.some((f) => f.key == AvailableFeature.EMAIL_SUPPORT) - ? supportResponseTimes[AvailableFeature.EMAIL_SUPPORT] - : 'Community support only')} + {plan.features.find((f) => f.key == AvailableFeature.SUPPORT_RESPONSE_TIME)?.note}
- ))} + ) + })}
- {getCtaLabel(gateVariant, productWithFeature, billing)} + {getCtaLabel(gateVariant, billing)} ) } @@ -46,11 +46,10 @@ const getCtaLink = ( const getCtaLabel = ( gateVariant: 'add-card' | 'contact-sales' | 'move-to-cloud' | null, - productWithFeature: BillingProductV2AddonType | BillingProductV2Type, billing: BillingV2Type | null ): string => { if (gateVariant === 'add-card') { - return billing?.has_active_subscription ? `Upgrade ${productWithFeature?.name}` : 'Subscribe now' + return billing?.has_active_subscription ? 'Upgrade now' : 'Subscribe now' } else if (gateVariant === 'contact-sales') { return 'Contact sales' } else { diff --git a/frontend/src/lib/components/PayGateMini/payGateMiniLogic.tsx b/frontend/src/lib/components/PayGateMini/payGateMiniLogic.tsx index ce8445a7b840c..ca22ef5029ba7 100644 --- a/frontend/src/lib/components/PayGateMini/payGateMiniLogic.tsx +++ b/frontend/src/lib/components/PayGateMini/payGateMiniLogic.tsx @@ -36,11 +36,15 @@ export const payGateMiniLogic = kea([ productWithFeature: [ (s) => [s.billing], (billing) => { - let foundProduct: BillingProductV2Type | BillingProductV2AddonType | undefined = - billing?.products?.find((product) => product.features?.some((f) => f.key === props.featureKey)) + // check addons first since their features are rolled up into the parent + const allAddons = billing?.products?.map((product) => product.addons).flat() || [] + let foundProduct: BillingProductV2Type | BillingProductV2AddonType | undefined = allAddons.find( + (addon) => addon.features?.some((f) => f.key === props.featureKey) + ) if (!foundProduct) { - const allAddons = billing?.products?.map((product) => product.addons).flat() || [] - foundProduct = allAddons.find((addon) => addon.features?.some((f) => f.key === props.featureKey)) + foundProduct = billing?.products?.find((product) => + product.features?.some((f) => f.key === props.featureKey) + ) } return foundProduct }, @@ -85,12 +89,10 @@ export const payGateMiniLogic = kea([ if (values.isCloudOrDev) { if (!minimumPlanWithFeature || minimumPlanWithFeature.contact_support) { return 'contact-sales' - } else { - return 'add-card' } - } else { - return 'move-to-cloud' + return 'add-card' } + return 'move-to-cloud' }, ], })), diff --git a/frontend/src/lib/lemon-ui/LemonSelect/LemonSelect.tsx b/frontend/src/lib/lemon-ui/LemonSelect/LemonSelect.tsx index 3e5a03c309fbd..b5df279fb3ac1 100644 --- a/frontend/src/lib/lemon-ui/LemonSelect/LemonSelect.tsx +++ b/frontend/src/lib/lemon-ui/LemonSelect/LemonSelect.tsx @@ -218,31 +218,30 @@ function convertToMenuSingle( items, custom: doOptionsContainCustomControl(childOptions), } as LemonMenuItemNode - } else { - acc.push(option) - if (option.hidden) { - // Add hidden options to the accumulator, but don't show - return null - } - const { value, label, labelInMenu, ...leaf } = option - let CustomControl: LemonSelectCustomControl | undefined - if (typeof labelInMenu === 'function') { - CustomControl = labelInMenu - } - return { - ...leaf, - label: CustomControl - ? function LabelWrapped() { - if (!CustomControl) { - throw new Error('CustomControl became undefined') - } - return - } - : labelInMenu || label, - active: value === activeValue, - onClick: () => onSelect(value), - } as LemonMenuItemLeaf } + acc.push(option) + if (option.hidden) { + // Add hidden options to the accumulator, but don't show + return null + } + const { value, label, labelInMenu, ...leaf } = option + let CustomControl: LemonSelectCustomControl | undefined + if (typeof labelInMenu === 'function') { + CustomControl = labelInMenu + } + return { + ...leaf, + label: CustomControl + ? function LabelWrapped() { + if (!CustomControl) { + throw new Error('CustomControl became undefined') + } + return + } + : labelInMenu || label, + active: value === activeValue, + onClick: () => onSelect(value), + } as LemonMenuItemLeaf } export function isLemonSelectSection( diff --git a/frontend/src/mocks/fixtures/_billing_v2.tsx b/frontend/src/mocks/fixtures/_billing_v2.tsx index f90062884a11a..4073ea1b464d3 100644 --- a/frontend/src/mocks/fixtures/_billing_v2.tsx +++ b/frontend/src/mocks/fixtures/_billing_v2.tsx @@ -37,6 +37,7 @@ export const billingJson: BillingV2Type = { docs_url: 'https://posthog.com/docs/product-analytics', note: null, unit: 'event', + flat_rate: false, free_allocation: 1000000, features: [ { @@ -99,6 +100,7 @@ export const billingJson: BillingV2Type = { docs_url: 'https://posthog.com/docs/product-analytics', note: null, unit: 'event', + flat_rate: false, free_allocation: null, features: [ { @@ -437,6 +439,7 @@ export const billingJson: BillingV2Type = { docs_url: 'https://posthog.com/docs/product-analytics/group-analytics', note: null, unit: 'event', + flat_rate: false, free_allocation: null, features: [ { @@ -628,6 +631,7 @@ export const billingJson: BillingV2Type = { docs_url: 'https://posthog.com/docs/cdp/batch-exports', note: null, unit: 'event', + flat_rate: false, free_allocation: null, features: [ { @@ -890,6 +894,7 @@ export const billingJson: BillingV2Type = { docs_url: 'https://posthog.com/docs/session-replay', note: null, unit: 'recording', + flat_rate: false, free_allocation: 5000, features: [ { @@ -1025,6 +1030,7 @@ export const billingJson: BillingV2Type = { docs_url: 'https://posthog.com/docs/session-replay', note: null, unit: 'recording', + flat_rate: false, free_allocation: null, features: [ { @@ -1460,6 +1466,7 @@ export const billingJson: BillingV2Type = { docs_url: 'https://posthog.com/docs/feature-flags', note: null, unit: 'request', + flat_rate: false, free_allocation: 1000000, features: [ { @@ -1601,6 +1608,7 @@ export const billingJson: BillingV2Type = { image_url: 'https://posthog.com/images/products/feature-flags/feature-flags.png', docs_url: 'https://posthog.com/docs/feature-flags', note: null, + flat_rate: false, unit: 'request', free_allocation: null, features: [ @@ -2014,6 +2022,7 @@ export const billingJson: BillingV2Type = { image_url: 'https://posthog.com/images/products/surveys/surveys.png', docs_url: 'https://posthog.com/docs/surveys', note: null, + flat_rate: false, unit: 'survey response', free_allocation: 250, features: [ @@ -2101,6 +2110,7 @@ export const billingJson: BillingV2Type = { image_url: 'https://posthog.com/images/products/surveys/surveys.png', docs_url: 'https://posthog.com/docs/surveys', note: null, + flat_rate: false, unit: 'survey response', free_allocation: null, features: [ @@ -2435,6 +2445,7 @@ export const billingJson: BillingV2Type = { docs_url: 'https://posthog.com/docs/cdp', note: null, unit: null, + flat_rate: false, free_allocation: null, features: [ { @@ -2495,6 +2506,7 @@ export const billingJson: BillingV2Type = { docs_url: 'https://posthog.com/docs/cdp', note: null, unit: null, + flat_rate: false, free_allocation: null, features: [ { @@ -2648,6 +2660,7 @@ export const billingJson: BillingV2Type = { docs_url: 'https://posthog.com/docs', note: null, unit: null, + flat_rate: false, free_allocation: null, features: [ { @@ -2723,6 +2736,7 @@ export const billingJson: BillingV2Type = { docs_url: 'https://posthog.com/docs', note: null, unit: null, + flat_rate: false, free_allocation: null, features: [ { @@ -2816,6 +2830,7 @@ export const billingJson: BillingV2Type = { docs_url: 'https://posthog.com/docs', note: null, unit: null, + flat_rate: false, free_allocation: null, features: [ { @@ -3012,6 +3027,7 @@ export const billingJson: BillingV2Type = { docs_url: 'https://posthog.com/docs', note: null, unit: null, + flat_rate: false, free_allocation: null, features: [ { diff --git a/frontend/src/scenes/billing/BillingProduct.tsx b/frontend/src/scenes/billing/BillingProduct.tsx index b4234746413be..4b9be919a6e82 100644 --- a/frontend/src/scenes/billing/BillingProduct.tsx +++ b/frontend/src/scenes/billing/BillingProduct.tsx @@ -9,7 +9,6 @@ import { IconChevronRight } from 'lib/lemon-ui/icons' import { LemonBanner } from 'lib/lemon-ui/LemonBanner' import { More } from 'lib/lemon-ui/LemonButton/More' import { Tooltip } from 'lib/lemon-ui/Tooltip' -import { featureFlagLogic } from 'lib/logic/featureFlagLogic' import { capitalizeFirstLetter, compactNumber } from 'lib/utils' import { eventUsageLogic } from 'lib/utils/eventUsageLogic' import { useRef } from 'react' @@ -40,9 +39,10 @@ export const getTierDescription = ( } export const BillingProductAddon = ({ addon }: { addon: BillingProductV2AddonType }): JSX.Element => { + const productRef = useRef(null) const { billing, redirectPath } = useValues(billingLogic) const { isPricingModalOpen, currentAndUpgradePlans, surveyID, billingProductLoading } = useValues( - billingProductLogic({ product: addon }) + billingProductLogic({ product: addon, productRef }) ) const { toggleIsPricingModalOpen, reportSurveyShown, setSurveyResponse, setBillingProductLoading } = useActions( billingProductLogic({ product: addon }) @@ -58,7 +58,7 @@ export const BillingProductAddon = ({ addon }: { addon: BillingProductV2AddonTyp } return ( -
+
{getProductIcon(addon.name, addon.icon_key, 'text-2xl')}
@@ -74,9 +74,29 @@ export const BillingProductAddon = ({ addon }: { addon: BillingProductV2AddonTyp )}

{addon.description}

+ {addon.features?.length > 1 && ( +
+

Features included:

+ {addon.features?.map((feature, i) => { + return ( + i < 6 && ( +
+ + + {feature.name} + +
+ ) + ) + })} +
+ )}
-
+
{addon.docs_url && ( } size="small" to={addon.docs_url} tooltip="Read the docs" /> )} @@ -104,15 +124,22 @@ export const BillingProductAddon = ({ addon }: { addon: BillingProductV2AddonTyp ) : ( <> - { - toggleIsPricingModalOpen() - }} - > - View pricing - + {currentAndUpgradePlans?.upgradePlan?.flat_rate ? ( +

+ ${Number(currentAndUpgradePlans?.upgradePlan?.unit_amount_usd)} + / + {currentAndUpgradePlans?.upgradePlan?.unit} +

+ ) : ( + { + toggleIsPricingModalOpen() + }} + > + View pricing + + )} } @@ -186,6 +213,9 @@ export const BillingProduct = ({ product }: { product: BillingProductV2Type }): const upgradeToPlanKey = upgradePlan?.plan_key const currentPlanKey = currentPlan?.plan_key + const showUpgradeCard = + (upgradePlan?.product_key !== 'platform_and_support' || product?.addons?.length === 0) && + (upgradePlan || (!upgradePlan && !product.current_amount_usd) || (isOnboarding && !product.contact_support)) const { ref, size } = useResizeBreakpoints({ 0: 'small', @@ -553,9 +583,7 @@ export const BillingProduct = ({ product }: { product: BillingProductV2Type }):
)}
- {(upgradePlan || - (!upgradePlan && !product.current_amount_usd) || - (isOnboarding && !product.contact_support)) && ( + {showUpgradeCard && (
([ return billing?.billing_period?.interval === 'year' }, ], + supportPlans: [ + (s) => [s.billing], + (billing: BillingV2Type): BillingV2PlanType[] => { + const platformAndSupportProduct = billing?.products?.find( + (product) => product.type == ProductKey.PLATFORM_AND_SUPPORT + ) + if (!platformAndSupportProduct?.plans) { + return [] + } + + const addonPlans = platformAndSupportProduct?.addons?.map((addon) => addon.plans).flat() + const insertionIndex = Math.max(0, (platformAndSupportProduct?.plans?.length ?? 1) - 1) + const allPlans = platformAndSupportProduct?.plans?.slice(0) || [] + allPlans.splice(insertionIndex, 0, ...addonPlans) + return allPlans + }, + ], + hasSupportAddonPlan: [ + (s) => [s.billing], + (billing: BillingV2Type): boolean => { + return !!billing?.products + ?.find((product) => product.type == ProductKey.PLATFORM_AND_SUPPORT) + ?.addons.find((addon) => addon.plans.find((plan) => plan.current_plan)) + }, + ], }), forms(({ actions, values }) => ({ activateLicense: { diff --git a/frontend/src/scenes/data-warehouse/settings/DataWarehouseSettingsScene.tsx b/frontend/src/scenes/data-warehouse/settings/DataWarehouseSettingsScene.tsx index 241bfe11e1a28..76de34894adcf 100644 --- a/frontend/src/scenes/data-warehouse/settings/DataWarehouseSettingsScene.tsx +++ b/frontend/src/scenes/data-warehouse/settings/DataWarehouseSettingsScene.tsx @@ -247,9 +247,8 @@ const SchemaTable = ({ schemas }: SchemaTableProps): JSX.Element => { {schema.table.name} ) - } else { - return
Not yet synced
} + return
Not yet synced
}, }, { diff --git a/frontend/src/scenes/experiments/experimentLogic.tsx b/frontend/src/scenes/experiments/experimentLogic.tsx index f0bff3999795f..6ed7ce968da4c 100644 --- a/frontend/src/scenes/experiments/experimentLogic.tsx +++ b/frontend/src/scenes/experiments/experimentLogic.tsx @@ -1001,22 +1001,22 @@ export const experimentLogic = kea([ // display the right colour for the variant if (!experimentResults || !experimentResults.insight) { return null - } else { - let index = -1 - if (insightType === InsightType.FUNNELS) { - // Funnel Insight is displayed in order of decreasing count - index = ([...experimentResults.insight] as FunnelStep[][]) - .sort((a, b) => b[0]?.count - a[0]?.count) - .findIndex( - (variantFunnel: FunnelStep[]) => variantFunnel[0]?.breakdown_value?.[0] === variant - ) - } else { - index = (experimentResults.insight as TrendResult[]).findIndex( - (variantTrend: TrendResult) => variantTrend.breakdown_value === variant + } + let index = -1 + if (insightType === InsightType.FUNNELS) { + // Funnel Insight is displayed in order of decreasing count + index = ([...experimentResults.insight] as FunnelStep[][]) + .sort((a, b) => b[0]?.count - a[0]?.count) + .findIndex( + (variantFunnel: FunnelStep[]) => variantFunnel[0]?.breakdown_value?.[0] === variant ) - } - result = index === -1 ? null : index + } else { + index = (experimentResults.insight as TrendResult[]).findIndex( + (variantTrend: TrendResult) => variantTrend.breakdown_value === variant + ) } + result = index === -1 ? null : index + if (result !== null && insightType === InsightType.FUNNELS) { result++ } @@ -1068,9 +1068,8 @@ export const experimentLogic = kea([ if (result % 1 !== 0) { // not an integer, so limit to 2 digits post decimal return result.toFixed(2) - } else { - return result.toString() } + return result.toString() }, ], exposureCountDataForVariant: [ @@ -1093,9 +1092,8 @@ export const experimentLogic = kea([ if (result % 1 !== 0) { // not an integer, so limit to 2 digits post decimal return result.toFixed(2) - } else { - return result.toString() } + return result.toString() }, ], getHighestProbabilityVariant: [ diff --git a/frontend/src/scenes/feature-flags/FeatureFlagSchedule.tsx b/frontend/src/scenes/feature-flags/FeatureFlagSchedule.tsx index b9d5d4260ff83..15c588e14010f 100644 --- a/frontend/src/scenes/feature-flags/FeatureFlagSchedule.tsx +++ b/frontend/src/scenes/feature-flags/FeatureFlagSchedule.tsx @@ -98,9 +98,8 @@ export default function FeatureFlagSchedule(): JSX.Element { return { type: 'danger', text: 'Error' } } else if (executed_at) { return { type: 'completion', text: 'Complete' } - } else { - return { type: 'default', text: 'Scheduled' } } + return { type: 'default', text: 'Scheduled' } } const { type, text } = getStatus() return ( diff --git a/frontend/src/scenes/pipeline/pipelineNodeLogic.tsx b/frontend/src/scenes/pipeline/pipelineNodeLogic.tsx index c0a94055f769b..2e054cfea2393 100644 --- a/frontend/src/scenes/pipeline/pipelineNodeLogic.tsx +++ b/frontend/src/scenes/pipeline/pipelineNodeLogic.tsx @@ -146,14 +146,13 @@ export const pipelineNodeLogic = kea([ destination: payload.service, }) return convertToPipelineNode(batchExport, values.node.stage) - } else { - payload = payload as PluginUpdatePayload - const pluginConfig = await api.pluginConfigs.update( - props.id as number, - getPluginConfigFormData(values.node.plugin.config_schema, values.node.config, payload) - ) - return convertToPipelineNode(pluginConfig, values.node.stage) } + payload = payload as PluginUpdatePayload + const pluginConfig = await api.pluginConfigs.update( + props.id as number, + getPluginConfigFormData(values.node.plugin.config_schema, values.node.config, payload) + ) + return convertToPipelineNode(pluginConfig, values.node.stage) }, }, ], @@ -164,23 +163,18 @@ export const pipelineNodeLogic = kea([ errors: (form) => { if (values.nodeBackend === PipelineBackend.BatchExport) { return batchExportFormFields(props.id === 'new', form as any, { isPipeline: true }) - } else { - return Object.fromEntries( - values.requiredFields.map((field) => [ - field, - form[field] ? undefined : 'This field is required', - ]) - ) } + return Object.fromEntries( + values.requiredFields.map((field) => [field, form[field] ? undefined : 'This field is required']) + ) }, submit: async (formValues) => { if (values.isNew) { // @ts-expect-error - Sadly Kea logics can't be generic based on props, so TS complains here return await asyncActions.createNode(formValues) - } else { - // @ts-expect-error - Sadly Kea logics can't be generic based on props, so TS complains here - await asyncActions.updateNode(formValues) } + // @ts-expect-error - Sadly Kea logics can't be generic based on props, so TS complains here + await asyncActions.updateNode(formValues) }, }, })), diff --git a/frontend/src/scenes/session-recordings/player/PlayerMetaLinks.tsx b/frontend/src/scenes/session-recordings/player/PlayerMetaLinks.tsx index 5a1a354436d83..f3b98d9774c2e 100644 --- a/frontend/src/scenes/session-recordings/player/PlayerMetaLinks.tsx +++ b/frontend/src/scenes/session-recordings/player/PlayerMetaLinks.tsx @@ -109,12 +109,11 @@ export function PlayerMetaLinks({ iconsOnly }: { iconsOnly: boolean }): JSX.Elem // Node already exists, we just add a comment theNodeLogic.actions.insertReplayCommentByTimestamp(time, sessionRecordingId) return - } else { - theNotebookLogic.actions.insertReplayCommentByTimestamp({ - timestamp: time, - sessionRecordingId, - }) } + theNotebookLogic.actions.insertReplayCommentByTimestamp({ + timestamp: time, + sessionRecordingId, + }) closeSessionPlayer() personsModalLogic.findMounted()?.actions.closeModal() diff --git a/frontend/src/toolbar/actions/actionsTabLogic.tsx b/frontend/src/toolbar/actions/actionsTabLogic.tsx index 7988a5384b134..7f1d82180be19 100644 --- a/frontend/src/toolbar/actions/actionsTabLogic.tsx +++ b/frontend/src/toolbar/actions/actionsTabLogic.tsx @@ -195,10 +195,9 @@ export const actionsTabLogic = kea([ (editingSelector, actionForm): string | null => { if (editingSelector === null) { return null - } else { - const selector = actionForm.steps?.[editingSelector].selector - return selector || null } + const selector = actionForm.steps?.[editingSelector].selector + return selector || null }, ], elementsChainBeingEdited: [ @@ -206,9 +205,8 @@ export const actionsTabLogic = kea([ (editingSelector, elementChains): ElementType[] => { if (editingSelector === null) { return [] - } else { - return elementChains[editingSelector] || [] } + return elementChains[editingSelector] || [] }, ], selectedAction: [ diff --git a/frontend/src/types.ts b/frontend/src/types.ts index b3d99d8022cd2..880b9e445478a 100644 --- a/frontend/src/types.ts +++ b/frontend/src/types.ts @@ -1510,6 +1510,7 @@ export interface BillingV2PlanType { docs_url: string | null note: string | null unit: string | null + flat_rate: boolean product_key: ProductKeyUnion current_plan?: boolean | null tiers?: BillingV2TierType[] | null