diff --git a/packages/shared-data/plans.ts b/packages/shared-data/plans.ts index 495abdbda6d..0124e3465e6 100644 --- a/packages/shared-data/plans.ts +++ b/packages/shared-data/plans.ts @@ -50,7 +50,7 @@ export const plans: PricingInformation[] = [ costUnit: '/ month', href: 'https://supabase.com/dashboard/new/new-project', priceLabel: 'From', - warning: 'Usage based plan', + warning: 'Usage-based plan', priceMonthly: 25, description: 'For production applications with the option to scale.', features: [ @@ -79,7 +79,7 @@ export const plans: PricingInformation[] = [ costUnit: '/ month', href: 'https://forms.supabase.com/team', priceLabel: 'From', - warning: 'Usage based plan', + warning: 'Usage-based plan', priceMonthly: 599, description: 'Collaborate with different permissions and access patterns.', features: [ diff --git a/studio/components/interfaces/Billing/PlanSelection/Plans/PlanCTAButton.tsx b/studio/components/interfaces/Billing/PlanSelection/Plans/PlanCTAButton.tsx index af2991c9fbb..444084b9579 100644 --- a/studio/components/interfaces/Billing/PlanSelection/Plans/PlanCTAButton.tsx +++ b/studio/components/interfaces/Billing/PlanSelection/Plans/PlanCTAButton.tsx @@ -105,7 +105,7 @@ const PlanCTAButton = ({ plan, currentPlan, onSelectPlan }: PlanCTAButtonProps) ) } - if (isTeamTier && plan.name === 'Team plan') { + if (!isTeamTier && plan.name === 'Team plan') { return ( diff --git a/studio/components/interfaces/Billing/PlanSelection/Plans/Plans.Constants.ts b/studio/components/interfaces/Billing/PlanSelection/Plans/Plans.Constants.ts index 5099f80d369..15f93675fc4 100644 --- a/studio/components/interfaces/Billing/PlanSelection/Plans/Plans.Constants.ts +++ b/studio/components/interfaces/Billing/PlanSelection/Plans/Plans.Constants.ts @@ -35,7 +35,7 @@ export const PRICING_META = { description: 'For production applications with the option to scale.', priceMonthly: 25, priceUnit: '/ month', - warning: 'Usage based plan', + warning: 'Usage-based plan', preface: 'Everything in the Free plan, plus:', features: [ 'No project pausing', @@ -59,7 +59,7 @@ export const PRICING_META = { description: 'Collaborate with different permissions and access patterns.', priceMonthly: 599, priceUnit: '/ month', - warning: 'Usage based plan', + warning: 'Usage-based plan', preface: 'Everything in the Pro plan, plus:', features: [ 'Additional Organization member roles', diff --git a/studio/components/interfaces/BillingV2/Subscription/Tier/TierUpdateSidePanel.tsx b/studio/components/interfaces/BillingV2/Subscription/Tier/TierUpdateSidePanel.tsx index 4e69db4e9fc..4dcd1fb4205 100644 --- a/studio/components/interfaces/BillingV2/Subscription/Tier/TierUpdateSidePanel.tsx +++ b/studio/components/interfaces/BillingV2/Subscription/Tier/TierUpdateSidePanel.tsx @@ -15,6 +15,8 @@ import ExitSurveyModal from './ExitSurveyModal' import MembersExceedLimitModal from './MembersExceedLimitModal' import PaymentMethodSelection from './PaymentMethodSelection' import { plans as subscriptionsPlans } from 'shared-data/plans' +import { useProjectSubscriptionV2Query } from 'data/subscriptions/project-subscription-v2-query' +import { PRICING_TIER_PRODUCT_IDS, STRIPE_PRODUCT_IDS } from 'lib/constants' const TierUpdateSidePanel = () => { const { ui } = useStore() @@ -32,6 +34,7 @@ const TierUpdateSidePanel = () => { const onClose = () => snap.setPanelKey(undefined) const { data: plans, isLoading: isLoadingPlans } = useProjectPlansQuery({ projectRef }) + const { data: subscription } = useProjectSubscriptionV2Query({ projectRef }) const { data: addons } = useProjectAddonsQuery({ projectRef }) const { data: membersExceededLimit } = useFreeProjectLimitCheckQuery({ slug }) const { mutateAsync: updateSubscriptionTier } = useProjectSubscriptionUpdateMutation() @@ -168,9 +171,14 @@ const TierUpdateSidePanel = () => { - ) : plan.id !== 'tier_team' ? ( + ) : plan.id !== PRICING_TIER_PRODUCT_IDS.TEAM ? (