-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "feat: let people subscribe from the paygate itself" (#20843)
- Loading branch information
1 parent
5c06e8e
commit 02c2de6
Showing
8 changed files
with
20 additions
and
183 deletions.
There are no files selected for viewing
Binary file modified
BIN
-40.6 KB
(66%)
...d/__snapshots__/scenes-app-insights-error-empty-states--long-loading--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 0 additions & 56 deletions
56
frontend/src/lib/components/PayGateMini/PayGateMiniButton.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,18 +4,17 @@ import { IconCheckCircle, IconWarning, IconX } from '@posthog/icons' | |
import { LemonButton, LemonModal, LemonTag, Link } from '@posthog/lemon-ui' | ||
import clsx from 'clsx' | ||
import { useActions, useValues } from 'kea' | ||
import { UNSUBSCRIBE_SURVEY_ID } from 'lib/constants' | ||
import { Tooltip } from 'lib/lemon-ui/Tooltip' | ||
import { eventUsageLogic } from 'lib/utils/eventUsageLogic' | ||
import React from 'react' | ||
import { getProductIcon } from 'scenes/products/Products' | ||
import { urls } from 'scenes/urls' | ||
import useResizeObserver from 'use-resize-observer' | ||
|
||
import { BillingProductV2AddonType, BillingProductV2Type, BillingV2FeatureType, BillingV2PlanType } from '~/types' | ||
|
||
import { convertLargeNumberToWords, getUpgradeProductLink } from './billing-utils' | ||
import { billingLogic } from './billingLogic' | ||
import { UNSUBSCRIBE_SURVEY_ID } from './BillingProduct' | ||
import { billingProductLogic } from './billingProductLogic' | ||
import { UnsubscribeSurveyModal } from './UnsubscribeSurveyModal' | ||
|
||
|
@@ -119,7 +118,7 @@ export const PlanComparison = ({ | |
const { width, ref: planComparisonRef } = useResizeObserver() | ||
const { reportBillingUpgradeClicked } = useActions(eventUsageLogic) | ||
const currentPlanIndex = plans.findIndex((plan) => plan.current_plan) | ||
const { surveyID, comparisonModalHighlightedFeatureKey } = useValues(billingProductLogic({ product })) | ||
const { surveyID } = useValues(billingProductLogic({ product })) | ||
const { reportSurveyShown, setSurveyResponse } = useActions(billingProductLogic({ product })) | ||
|
||
const upgradeButtons = plans?.map((plan, i) => { | ||
|
@@ -131,26 +130,18 @@ export const PlanComparison = ({ | |
? 'mailto:[email protected]?subject=Enterprise%20plan%20request' | ||
: !plan.included_if | ||
? getUpgradeProductLink(product, plan.plan_key || '', redirectPath, includeAddons) | ||
: plan.included_if == 'has_subscription' && | ||
i >= currentPlanIndex && | ||
!billing?.has_active_subscription | ||
? urls.organizationBilling() | ||
: undefined | ||
} | ||
type={plan.current_plan || i < currentPlanIndex ? 'secondary' : 'primary'} | ||
status={ | ||
plan.current_plan || (plan.included_if == 'has_subscription' && i >= currentPlanIndex) | ||
? 'default' | ||
: 'alt' | ||
} | ||
status={plan.current_plan ? 'default' : 'alt'} | ||
fullWidth | ||
center | ||
disableClientSideRouting={!plan.contact_support} | ||
disabledReason={ | ||
plan.included_if == 'has_subscription' && i >= currentPlanIndex | ||
? billing?.has_active_subscription | ||
? 'Unsubscribe from all products to remove' | ||
: null | ||
: 'Subscribe to any product for access' | ||
: plan.current_plan | ||
? 'Current plan' | ||
: undefined | ||
|
@@ -172,10 +163,6 @@ export const PlanComparison = ({ | |
? 'Downgrade' | ||
: plan.contact_support | ||
? 'Get in touch' | ||
: plan.included_if == 'has_subscription' && | ||
i >= currentPlanIndex && | ||
!billing?.has_active_subscription | ||
? 'View products' | ||
: 'Subscribe'} | ||
</LemonButton> | ||
{!plan.current_plan && !plan.free_allocation && includeAddons && product.addons?.length > 0 && ( | ||
|
@@ -277,11 +264,11 @@ export const PlanComparison = ({ | |
{fullyFeaturedPlan?.features?.map((feature, i) => ( | ||
<tr | ||
key={`tr-${feature.key}`} | ||
className={clsx( | ||
className={ | ||
i == fullyFeaturedPlan?.features?.length - 1 && !billing?.has_active_subscription | ||
? 'PlanTable__tr__border' | ||
: '' | ||
)} | ||
} | ||
> | ||
<th | ||
className={clsx( | ||
|
@@ -291,15 +278,7 @@ export const PlanComparison = ({ | |
)} | ||
> | ||
<Tooltip title={feature.description}> | ||
<div | ||
className={ | ||
comparisonModalHighlightedFeatureKey === feature.key | ||
? 'border-b-2 border-danger-lighter px-1 pb-1 w-max' | ||
: undefined | ||
} | ||
> | ||
<span>{feature.name}</span> | ||
</div> | ||
<span>{feature.name}</span> | ||
</Tooltip> | ||
</th> | ||
{plans?.map((plan) => ( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters