// FastFund website — data-driven Product detail page.
// Reads its content from window.CF_PRODUCTS[productKey] (see ProductData.jsx).
function ProductDetail({ onApply, productKey = 'sba' }) {
const { Button, Stat, Card, ProductCard } = window.CapFrontDesignSystem_019e08;
const { mobile, tablet } = window.useBreakpoint();
const p = (window.CF_PRODUCTS && window.CF_PRODUCTS[productKey]) || {};
const related = (p.related || []).map((k) => window.CF_PRODUCTS[k]).filter(Boolean);
return (
{/* Product hero */}
{p.badge}
{p.headline}
{p.sub}
{p.snapshot}
{(p.stats || []).map((s, i) => )}
{/* How it works */}
How it works
From application to funded
{(p.steps || []).map((s, i) => (
{s.t}
{s.b}
))}
{/* Eligibility + FAQ */}
Eligibility
Do you qualify?
{(p.eligibility || []).map((e) => (
-
{e}
))}
FAQ
Common questions
{(p.faqs || []).map((f, i) => )}
{/* Related products */}
{related.length > 0 && (
Explore other products
{related.map((r) => (
} />
))}
)}
);
}
function FaqItem({ q, a, open = false }) {
const [isOpen, setOpen] = React.useState(open);
return (
{isOpen && (
{a}
)}
);
}
window.ProductDetail = ProductDetail;