diff --git a/studio/components/interfaces/Billing/Subscription/Subscription.tsx b/studio/components/interfaces/Billing/Subscription/Subscription.tsx index 10b8589194a..c56b86c5677 100644 --- a/studio/components/interfaces/Billing/Subscription/Subscription.tsx +++ b/studio/components/interfaces/Billing/Subscription/Subscription.tsx @@ -3,11 +3,9 @@ import dayjs from 'dayjs' import { sum } from 'lodash' import { useRouter } from 'next/router' import { Loading, Button } from '@supabase/ui' -import { Dictionary } from 'components/grid' - import { formatBytes } from 'lib/helpers' import { STRIPE_PRODUCT_IDS } from 'lib/constants' -import { useStore, useSubscriptionStats } from 'hooks' +import { useStore } from 'hooks' import CostBreakdownRow from './CostBreakdownRow' import { StripeSubscription } from './Subscription.types' import { deriveFeatureCost, deriveProductCost } from '../PAYGUsage/PAYGUsage.utils' diff --git a/studio/components/interfaces/Organization/BillingSettings/AWSMarketplaceSubscription.tsx b/studio/components/interfaces/Organization/BillingSettings/AWSMarketplaceSubscription.tsx index 5a7acdac437..cf175daa039 100644 --- a/studio/components/interfaces/Organization/BillingSettings/AWSMarketplaceSubscription.tsx +++ b/studio/components/interfaces/Organization/BillingSettings/AWSMarketplaceSubscription.tsx @@ -9,8 +9,7 @@ const AWSMarketplaceSubscription: FC = ({ organization }) => { return (
- This organization is subscribed via AWS Marketplace, with a limit of{' '} - {organization.project_limit} projects and expiring on{' '} + This organization is subscribed via AWS Marketplace. The subscription expires on{' '} {organization.aws_marketplace.Entitlements[0].ExpirationDate.slice(0, 10)}. diff --git a/studio/hooks/queries/useProjectPaygStatistics.ts b/studio/hooks/queries/useProjectPaygStatistics.ts index 37b11a69ec5..ee4507ff5e4 100644 --- a/studio/hooks/queries/useProjectPaygStatistics.ts +++ b/studio/hooks/queries/useProjectPaygStatistics.ts @@ -50,7 +50,7 @@ function getPaygStats(data: any): PaygStats { let dataModified: any = [] data.map((x: any) => { - dataModified.push({ ...x, total_egress_modified: x.total_egress == undefined ? 0 : x.total_egress - x.total_storage_egress == undefined ? 0 : x.total_storage_egress }) + dataModified.push({ ...x, total_egress_modified: (x.total_egress == undefined ? 0 : x.total_egress) - (x.total_storage_egress == undefined ? 0 : x.total_storage_egress) }) }) chargeableProducts.forEach((product) => { @@ -73,5 +73,6 @@ function getPaygStats(data: any): PaygStats { } }) }) + return paygStats } diff --git a/studio/types/base.ts b/studio/types/base.ts index 7d7bf5145f8..f89b9da7edf 100644 --- a/studio/types/base.ts +++ b/studio/types/base.ts @@ -3,13 +3,8 @@ export interface Organization { slug: string name: string billing_email: string - project_limit: number - members: any[] - projects: any[] is_owner?: boolean stripe_customer_id?: string - total_free_projects?: number - total_paid_projects?: number } export interface ProjectBase { @@ -38,7 +33,7 @@ export interface Project extends ProjectBase { * We use this status to check if a project instance is HEALTHY or not * If not we will show ConnectingState and run a polling until it's back online */ - postgrestStatus?: 'ONLINE' | 'OFFLINE' + postgrestStatus?: 'ONLINE' | 'OFFLINE' } export interface User {