diff --git a/apps/web/app/(main)/pro/page.tsx b/apps/web/app/(main)/pro/page.tsx index e5bad74..9178d3c 100644 --- a/apps/web/app/(main)/pro/page.tsx +++ b/apps/web/app/(main)/pro/page.tsx @@ -14,14 +14,15 @@ import Link from 'next/link'; export default async function ProPage() { const { telegramId } = await getSessionUser(); - const { hasActiveSubscription } = await getSubscription({ - telegramId, - }); const { subscriptions } = await getSubscriptions({ filters: { customer: { telegramId: { eq: telegramId } } }, }); + const hasActiveSubscription = subscriptions?.length + ? ((await getSubscription({ telegramId }))?.hasActiveSubscription ?? false) + : false; + const canUseTrial = !subscriptions?.length; const { subscriptionPrices = [] } = await getSubscriptionPrices({