Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix(studio): update log drain empty state to show pro tier upgrade (#43462)

Matt Linkous5b2721c0db76
diff --git a/apps/studio/components/interfaces/LogDrains/LogDrainsEmpty.tsx b/apps/studio/components/interfaces/LogDrains/LogDrainsEmpty.tsx
index c9f6ab3af98..8765914043b 100644
--- a/apps/studio/components/interfaces/LogDrains/LogDrainsEmpty.tsx
+++ b/apps/studio/components/interfaces/LogDrains/LogDrainsEmpty.tsx
@@ -3,6 +3,7 @@ import { UpgradePlanButton } from 'components/ui/UpgradePlanButton'
import { DOCS_URL } from 'lib/constants'
import Link from 'next/link'
import { Button, Card, cn } from 'ui'
+
import { AnimatedLogos } from './AnimatedLogos'
import { VoteLink } from './VoteLink'
@@ -12,7 +13,7 @@ export const LogDrainsEmpty = () => {
step: 1,
title: 'Pricing',
description:
- 'Log Drains are available as a project Add-On for all Team and Enterprise users. Each Log Drain costs $60 per month.',
+ 'Log Drains are available as a project Add-On for all Pro, Team, and Enterprise users. Each Log Drain costs $60 per month.',
label: 'See our pricing',
link: `${DOCS_URL}/guides/platform/manage-your-usage/log-drains`,
},
@@ -34,10 +35,11 @@ export const LogDrainsEmpty = () => {
<AnimatedLogos />
<h2 className="heading-section mb-1">Capture your logs, your way</h2>
<p className="text-foreground-light mb-6">
- Upgrade to a Team or Enterprise Plan to send your logs to your preferred platform
+ Upgrade to a Pro, Team or Enterprise Plan to send your logs to your preferred platform
</p>
+ {/* This should only be shown to free tier users so upgrade to Pro makes sense */}
<UpgradePlanButton
- plan="Team"
+ plan="Pro"
source="log-drains-empty-state"
featureProposition="use Log Drains"
/>
diff --git a/apps/studio/components/interfaces/Organization/BillingSettings/Subscription/PlanUpdateSidePanel.tsx b/apps/studio/components/interfaces/Organization/BillingSettings/Subscription/PlanUpdateSidePanel.tsx
index 3c6b01b2faa..b8252ec5b81 100644
--- a/apps/studio/components/interfaces/Organization/BillingSettings/Subscription/PlanUpdateSidePanel.tsx
+++ b/apps/studio/components/interfaces/Organization/BillingSettings/Subscription/PlanUpdateSidePanel.tsx
@@ -1,9 +1,4 @@
import { PermissionAction } from '@supabase/shared-types/out/constants'
-import { isArray } from 'lodash'
-import { Check, ExternalLink } from 'lucide-react'
-import { useRouter } from 'next/router'
-import { useEffect, useMemo, useRef, useState } from 'react'
-
import { useParams } from 'common'
import { StudioPricingSidePanelOpenedEvent } from 'common/telemetry-constants'
import { getPlanChangeType } from 'components/interfaces/Billing/Subscription/Subscription.utils'
@@ -22,11 +17,16 @@ import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization'
import { MANAGED_BY } from 'lib/constants/infrastructure'
import { formatCurrency } from 'lib/helpers'
+import { isArray } from 'lodash'
+import { Check, ExternalLink } from 'lucide-react'
+import { useRouter } from 'next/router'
+import { useEffect, useMemo, useRef, useState } from 'react'
import { plans as subscriptionsPlans } from 'shared-data/plans'
import { useOrgSettingsPageStateSnapshot } from 'state/organization-settings'
import { Organization } from 'types/base'
-import { Button, SidePanel, cn } from 'ui'
+import { Button, cn, SidePanel } from 'ui'
import { ShimmeringLoader } from 'ui-patterns/ShimmeringLoader'
+
import DowngradeModal from './DowngradeModal'
import { EnterpriseCard } from './EnterpriseCard'
import { ExitSurveyModal } from './ExitSurveyModal'
@@ -187,7 +187,8 @@ export const PlanUpdateSidePanel = () => {
const source = Array.isArray(router.query.source)
? router.query.source[0]
: router.query.source
- const shouldHighlight = source === 'log-drains-empty-state' && plan.id === 'tier_team'
+ // TODO this panel should allow direct configuration of the highlighting rather than indirectly via the source param
+ const shouldHighlight = source === 'log-drains-empty-state' && plan.id === 'tier_pro'
if (plan.id === 'tier_enterprise') {
return <EnterpriseCard key={plan.id} plan={plan} isCurrentPlan={isCurrentPlan} />