Skip to content

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

fix: do not show usage spark chart for PAYG

Jonathan Summers-Muir804ee5e7a49c
diff --git a/studio/components/to-be-cleaned/Usage.tsx b/studio/components/to-be-cleaned/Usage.tsx
index f442d03903b..ef03f7914ca 100644
--- a/studio/components/to-be-cleaned/Usage.tsx
+++ b/studio/components/to-be-cleaned/Usage.tsx
@@ -272,6 +272,10 @@ export const ProjectUsageMinimal: FC<any> = ({ projectRef, subscription_id, filt
const { data: stats, error: usageError } = useSWR(`${API_URL}/projects/${projectRef}/usage`, get)
const { subscription, isLoading: loading, error } = useProjectSubscription(projectRef)
+ if (subscription?.tier?.supabase_prod_id === PRICING_TIER_PRODUCT_IDS.PAYG) {
+ return <></>
+ }
+
const tier =
subscription?.tier?.supabase_prod_id === PRICING_TIER_PRODUCT_IDS.PRO ? 'pro' : 'free'