// 彤冠茶莊 website — Home const { Button: HButton, ProductCard: HProductCard, Tag: HTag } = window.TongguanTeaDesignSystem_a1a7a1; function HeroLines({ text, style }) { return text.split("\n").map((l, i) => {l}); } function HomePage({ t, lang, products, go, addToCart, journal }) { React.useEffect(() => { if (window.lucide) window.lucide.createIcons(); }); const featured = products.find((p) => p.featured) || products[0]; const grid = products.slice(0, 4); return (
{/* HERO */}
{t.hero.kicker}

{t.hero.body}

go("shop")}>{t.hero.cta1} go("story")}>{t.hero.cta2}
{/* VALUES — dark tea band */}
{t.values.kicker}
{t.values.items.map((v, i) => (
{v.t}

{v.d}

))}
{/* FEATURED */}
{featured.name[lang]}
{t.featured.kicker}

{t.featured.title}

{featured.tags.map((tg, i) => {tg[lang]})}

{t.featured.body}

go("product", featured.id)}>{t.featured.cta}
{/* SHOP PREVIEW */}
{t.shop.title}

{t.shop.body}

{grid.map((p) => ( ({ label: tg[lang], tone: tg.tone }))} amount={p.price} addLabel={t.product.add} onAdd={() => addToCart(p.id)} onClick={() => go("product", p.id)} /> ))}
{/* JOURNAL PREVIEW */}
{t.journalSec.kicker}

{t.journalSec.title}

{journal.map((j) => (
go("journal")} style={{ cursor: "pointer" }}>
{j.cat[lang]} {j.date}

{j.title[lang]}

{j.excerpt[lang]}

))}
{/* NEWSLETTER */}
); } function NewsletterBand({ t }) { const [val, setVal] = React.useState(""); const [done, setDone] = React.useState(false); return (
{t.newsletter.kicker}

{t.newsletter.title}

{t.newsletter.body}

{ e.preventDefault(); setDone(true); }} style={{ display: "flex", gap: 10, maxWidth: 460, margin: "0 auto" }}> setVal(e.target.value)} type="email" required placeholder={t.newsletter.ph} style={{ flex: 1, height: 52, padding: "0 18px", border: "1px solid var(--border-on-dark)", background: "rgba(252,250,244,0.06)", color: "var(--paper-0)", borderRadius: "var(--radius-sm)", fontFamily: "var(--font-sans)", fontSize: 15, outline: "none" }} /> {done ? "✓" : t.newsletter.btn}
); } window.HomePage = HomePage;