{t.checkout.placed}
{t.checkout.placedBody}
// 彤冠茶莊 website — Checkout
const { Button: CkButton, Input: CkInput, Select: CkSelect, Price: CkPrice } = window.TongguanTeaDesignSystem_a1a7a1;
function CheckoutPage({ t, lang, products, items, setQty, removeItem, go, clearCart }) {
const [placed, setPlaced] = React.useState(false);
React.useEffect(() => { if (window.lucide) window.lucide.createIcons(); });
const lines = items.map((it) => ({ ...it, p: products.find((p) => p.id === it.id) })).filter((x) => x.p);
const subtotal = lines.reduce((s, l) => s + l.p.price * l.qty, 0);
const freeShip = subtotal >= 1500;
const ship = freeShip || subtotal === 0 ? 0 : 120;
const total = subtotal + ship;
if (placed) {
return (
{t.checkout.placedBody} {t.cart.empty}{t.checkout.placed}
{t.checkout.title}