mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-30 02:23:47 +00:00
The info tab needed a different shape than the prior 5 — its panelInfo, promoGroups, editingPromoGroup, action handlers (reset-trial, disable, full-delete) are SHARED with the subscription tab and with the inline-confirm armer up in the parent. Moving any of that into the tab would either duplicate the query/state or fork the confirm state. So the new InfoTab is a 'view facade': state and handlers stay parent-owned, the JSX moves out. Prop surface is wide (~25 props) but every prop is a single 'pass through' line at the call site — no logic shifted. Each handler / state slot still lives in exactly one place; the tab only renders. Bonus: the parent's formatWithCurrency / useCurrency import is dropped — info tab was the last consumer in the page body. Net to AdminUserDetail.tsx: down to 1992 lines (-403). Total journey across the 6 tab extractions: 3820 → 1992 (-1828, -48%). Only the subscription tab JSX (~1043 lines) remains inline.