Manage state of price-lookup calls (#5915)

Now calls stripe-price-lookup once when prices are required rather then
bombarding on every rerender
This commit is contained in:
ConnorYoh
2026-03-11 13:53:49 +00:00
committed by GitHub
parent 32cf6866f3
commit d5d03b9ada
7 changed files with 136 additions and 143 deletions
+5 -1
View File
@@ -13,9 +13,13 @@ export const BILLING_CONFIG = {
// Overage pricing (per credit) - also fetched dynamically from Stripe
OVERAGE_PRICE_PER_CREDIT: 0.05,
// Credit warning threshold
// Credit warning threshold (shows low-balance indicator)
LOW_CREDIT_THRESHOLD: 10,
// Threshold at which plan pricing is preloaded (higher than LOW_CREDIT_THRESHOLD
// so prices are ready before the warning UI appears)
PLAN_PRICING_PRELOAD_THRESHOLD: 20,
// Stripe lookup keys
PRO_PLAN_LOOKUP_KEY: 'plan:pro',
METER_LOOKUP_KEY: 'meter:overage',