🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.
Add number formatting for event limits in PricingSection component
Bill Yang432eca1a4312
diff --git a/docs/src/app/components/PricingSection.jsx b/docs/src/app/components/PricingSection.jsxindex e02c97789..647203877 100644--- a/docs/src/app/components/PricingSection.jsx+++ b/docs/src/app/components/PricingSection.jsx@@ -20,6 +20,10 @@ const PRO_FEATURES = ["All features"];+export const formatter = Intl.NumberFormat("en", {+ notation: "compact",+}).format;+// Format price with dollar signfunction getFormattedPrice(eventLimit, isAnnual) {// Monthly prices from stripe.ts@@ -89,9 +93,12 @@ export function PricingSection() {<div className="flex justify-between mb-3 items-center"><div><h3 className="font-semibold mb-2">Events per month</h3>- <div className="text-3xl font-bold text-emerald-400">+ <div className="text-3xl font-bold text-emerald-400 hidden md:block">{eventLimit.toLocaleString()}</div>+ <div className="text-3xl font-bold text-emerald-400 md:hidden">+ {isNaN(eventLimit) ? "10M+" : formatter(eventLimit)}+ </div></div><div className="flex flex-col items-end">{/* Billing toggle */}