The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
fix types
Steven Teyf106bbc29701
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/billing/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/billing/page-client.tsxindex 6c3b13b882..0c7d00ef86 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/billing/page-client.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/billing/page-client.tsx@@ -73,20 +73,19 @@ export default function WorkspaceBillingClient() {setConfetti(true);setTimeout(async () => {await mutate(`/api/workspaces/${id}`);- if (plan) {- const planDetails = getPlanDetails(plan)!;+ const currentPlan = plan ? getPlanDetails(plan) : undefined;+ if (currentPlan && currentPlan.price.monthly) {// track upgrade eventplausible("Upgraded Plan", {- props: {- revenue: {- currency: "USD",- amount: planDetails.price.monthly,- },+ props: {},+ revenue: {+ currency: "USD",+ amount: currentPlan.price.monthly,},});posthog.capture("plan_upgraded", {- plan,- revenue: planDetails.price.monthly,+ plan: currentPlan.name,+ revenue: currentPlan.price.monthly,});}}, 1000);