diff --git a/apps/web/app/(dashboard)/home/(user)/billing/page.tsx b/apps/web/app/(dashboard)/home/(user)/billing/page.tsx index afc898b82..0b1dccf75 100644 --- a/apps/web/app/(dashboard)/home/(user)/billing/page.tsx +++ b/apps/web/app/(dashboard)/home/(user)/billing/page.tsx @@ -60,24 +60,24 @@ async function PersonalAccountBillingPage() { - {(subscription) => ( + {(data) => (
- + {'active' in data ? ( - - - - - + ) : ( + )} + + + diff --git a/apps/web/app/(dashboard)/home/[account]/billing/page.tsx b/apps/web/app/(dashboard)/home/[account]/billing/page.tsx index 8969359dd..0a0da8f16 100644 --- a/apps/web/app/(dashboard)/home/[account]/billing/page.tsx +++ b/apps/web/app/(dashboard)/home/[account]/billing/page.tsx @@ -2,6 +2,7 @@ import { ExclamationTriangleIcon } from '@radix-ui/react-icons'; import { BillingPortalCard, + CurrentLifetimeOrderCard, CurrentSubscriptionCard, } from '@kit/billing-gateway/components'; import { Alert, AlertDescription, AlertTitle } from '@kit/ui/alert'; @@ -39,8 +40,7 @@ async function TeamAccountBillingPage({ params }: Params) { const workspace = await loadTeamWorkspace(params.account); const accountId = workspace.account.id; - const [subscription, customerId] = - await loadTeamAccountBillingPage(accountId); + const [data, customerId] = await loadTeamAccountBillingPage(accountId); const canManageBilling = workspace.account.permissions.includes('billing.manage'); @@ -81,23 +81,31 @@ async function TeamAccountBillingPage({ params }: Params) {
} > - {(subscription) => ( - - )} + {(data) => { + if ('active' in data) { + return ( + + ); + } + + return ( + + ); + }}