🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.
Refactor subscription status handling and update pricing display
Bill Yang8b039aa351f5
diff --git a/client/src/app/globals.css b/client/src/app/globals.cssindex c88b3d168..1c3f9132f 100644--- a/client/src/app/globals.css+++ b/client/src/app/globals.css@@ -42,19 +42,6 @@ body {--accent-900: var(--emerald-900);--accent-950: var(--emerald-950);- /* --accent-50: 155 30% 96%;- --accent-100: 155 60% 94%;- --accent-200: 155 65% 88%;- --accent-300: 155 70% 74%;- --accent-400: 155 80% 60%;- --accent-500: 155 80% 48%;- --accent-600: 155 75% 40%;- --accent-700: 155 70% 32%;- --accent-800: 155 70% 24%;- --accent-900: 155 75% 20%;- --accent-950: 155 80% 12%; */--/* Slate */--slate-50: 210 40% 98%;--slate-100: 210 40% 96.1%;diff --git a/client/src/app/settings/subscription/utils/useStripeSubscription.ts b/client/src/app/settings/subscription/utils/useStripeSubscription.tsindex b9b4d9504..c8acf6d65 100644--- a/client/src/app/settings/subscription/utils/useStripeSubscription.ts+++ b/client/src/app/settings/subscription/utils/useStripeSubscription.ts@@ -4,15 +4,7 @@ import { BACKEND_URL } from "../../../../lib/const";interface SubscriptionData {id: string;planName: string;- status:- | "incomplete"- | "incomplete_expired"- | "trialing"- | "active"- | "past_due"- | "canceled"- | "unpaid"- | "paused";+ status: "expired" | "active" | "trialing";currentPeriodEnd: string;monthlyEventCount: number;eventLimit: number;diff --git a/client/src/app/subscribe/page.tsx b/client/src/app/subscribe/page.tsxindex 844336872..67be05b9e 100644--- a/client/src/app/subscribe/page.tsx+++ b/client/src/app/subscribe/page.tsx@@ -199,12 +199,9 @@ export default function Subscribe() {{isAnnual ? (<><span className="text-3xl font-bold">- ${annualPrice}+ ${Math.round(annualPrice / 12)}</span>- <span className="ml-1 text-neutral-400">/year</span>- <div className="text-sm text-neutral-400">- ${Math.round(annualPrice / 12)}/mo- </div>+ <span className="ml-1 text-neutral-400">/month</span></>) : (<>diff --git a/docs/src/app/components/PricingSection.jsx b/docs/src/app/components/PricingSection.jsxindex 45461ab27..37d2a06c6 100644--- a/docs/src/app/components/PricingSection.jsx+++ b/docs/src/app/components/PricingSection.jsx@@ -116,13 +116,10 @@ export function PricingSection() {<div className="text-right">{isAnnual ? (<>- <span className="text-3xl font-bold">${prices.annual}</span>+ <span className="text-3xl font-bold">${Math.round(prices.annual / 12)}</span><span className="ml-1 text-neutral-400">- /year+ /month</span>- <div className="text-sm text-neutral-400">- ${Math.round(prices.annual / 12)}/mo- </div></>) : (<>