fix: do not show usage spark chart for PAYG

This commit is contained in:
Jonathan Summers-Muir committed 2022-04-27 12:05:13 +08:00
1 parent 0717b4ece4
commit 804ee5e7a4
1 file changed
+4
@@ -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'