From 63b6d2ff11c49064a7a068b8bbd28d951b24ce32 Mon Sep 17 00:00:00 2001 From: chahinebrini Date: Sat, 16 May 2026 02:24:55 +0200 Subject: [PATCH] fix(native): provisional slot limits match the backend plan (5/5, 10/10) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The user looked at the legend dashboard and saw 4/8 + 0/2 for the web and mail buckets instead of the agreed 10/10. The hook's client-side provisional limits were holdovers from an earlier sketch — 8/2 for legend, 4/1 for free/pro — that never matched plan-features.ts on the backend (5/5 and 10/10 respectively). Brought them in line so the header counters read correctly until the API-driven values land via the new GET /api/custom-domains response shape. --- apps/rebreak-native/hooks/useCustomDomains.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/rebreak-native/hooks/useCustomDomains.ts b/apps/rebreak-native/hooks/useCustomDomains.ts index 5f3ccb0..9bada2a 100644 --- a/apps/rebreak-native/hooks/useCustomDomains.ts +++ b/apps/rebreak-native/hooks/useCustomDomains.ts @@ -186,8 +186,12 @@ export function useCustomDomains(plan: Plan): UseCustomDomainsReturn { ).length, }; - const webLimit = plan === 'legend' ? 8 : 4; - const mailLimit = plan === 'legend' ? 2 : 1; + // Provisional client-side limits — match plan-features.ts on the backend + // (free/pro: 5+5, legend: 10+10). Will be replaced by API-driven values + // once GET /api/custom-domains routes the new { items, counts, limits } + // response shape through the hook. + const webLimit = plan === 'legend' ? 10 : 5; + const mailLimit = plan === 'legend' ? 10 : 5; const limits: LimitsByType = { web: webLimit, mail: mailLimit }; return {