diff --git a/memento-note/components/settings/billing-plans.tsx b/memento-note/components/settings/billing-plans.tsx index dc6e9d9..6fdc03f 100644 --- a/memento-note/components/settings/billing-plans.tsx +++ b/memento-note/components/settings/billing-plans.tsx @@ -54,17 +54,18 @@ export function BillingPlans() { }, }); - const { data: quotas } = useQuery({ + const { data: usageData } = useQuery({ queryKey: ['usage', 'current'], queryFn: async () => { const res = await fetch('/api/usage/current'); if (!res.ok) throw new Error('Failed to fetch quotas'); - const data = await res.json(); - return data.quotas as Record; + return res.json(); }, refetchInterval: 30000, }); + const quotas = usageData?.quotas; + useEffect(() => { const params = new URLSearchParams(window.location.search); const sessionId = params.get('session_id'); @@ -455,14 +456,13 @@ export function BillingPlans() { {/* Billing History (Only for paid users) */} {isPaid && } - {/* Interval Toggle & Plan Cards (Only for BASIC/Free users) */} - {!isPaid && ( -
-
-

- {t('billing.upgradePlan') || 'Changer de plan'} -

-
+ {/* Interval Toggle & Plan Cards */} +
+
+

+ {t('billing.upgradePlan') || 'Changer de plan'} +

+
{billingEnabled && (
@@ -541,7 +541,6 @@ export function BillingPlans() { ))}
- )} {/* Footer Info */}
diff --git a/memento-note/locales/en.json b/memento-note/locales/en.json index d6200f4..f6914b1 100644 --- a/memento-note/locales/en.json +++ b/memento-note/locales/en.json @@ -2860,7 +2860,7 @@ "businessFeature4": "1,000 chat messages / month", "enterpriseTitle": "Enterprise", "enterpriseDescription": "Custom quotas, SSO, priority support.", - "contactSales": "Contact Sales", + "contactSales": "Contact us", "startCheckout": "Get Started", "checkoutLoading": "Loading checkout…", "checkoutSuccess": "Subscription activated! Welcome to {tier}.", diff --git a/memento-note/locales/fr.json b/memento-note/locales/fr.json index e5fbc4f..1ba9aed 100644 --- a/memento-note/locales/fr.json +++ b/memento-note/locales/fr.json @@ -2864,7 +2864,7 @@ "businessFeature4": "1 000 messages de chat / mois", "enterpriseTitle": "Entreprise", "enterpriseDescription": "Quotas personnalisés, SSO, support prioritaire.", - "contactSales": "Contacter les ventes", + "contactSales": "Contactez-nous", "startCheckout": "Commencer", "checkoutLoading": "Chargement du paiement…", "checkoutSuccess": "Abonnement activé ! Bienvenue dans {tier}.",