// All page-level views for Unique Furniture. // Exported to window so app.jsx can render them. const { useState, useMemo, useEffect, useRef } = React; // ───────────────────────────────────────────────────────────────────────── // HOME // ───────────────────────────────────────────────────────────────────────── function HomePage({ t, navigate, financingMode, onAddToCart }) { const featured = window.PRODUCTS.filter((p) => p.badge === "Bestseller" || p.badge === "Crafted by us").slice(0, 4); return (
{/* HERO */}
{t.hero.eyebrow}

{t.hero.h.a} {t.hero.h.em}
{t.hero.h.b}

{t.hero.sub}

{t.stats.map((s, i) => (
{s.n}
{s.l}
))}
{/* MARQUEE */} {/* CATEGORIES */}
{t.catHead.h.a} {t.catHead.h.em}} />
{window.CATEGORIES.map((c) => (
navigate("shop", c.name)}>
{c.name} {c.count} pieces
))}
{/* FEATURED */}
{t.featured.h.a} {t.featured.h.em}} cta="Shop all bestsellers" onCta={() => navigate("shop")} />
{featured.map((p) => ( navigate("product", id)}/> ))}
{/* WORKSHOP STRIP */}
{t.workshop.tag}

{t.workshop.h}

{t.workshop.p}

{/* TESTIMONIALS */}
{t.testiHead.h.a} {t.testiHead.h.em}} />
{window.TESTIMONIALS.map((tt, i) => (
★★★★★

"{tt.q}"

{tt.name} · {tt.city}
))}
{/* FINANCING CARD (volume varies via tweak) */} {financingMode !== "off" && (
{t.financing.eyebrow}

{t.financing.h.a} {t.financing.h.em}

{t.financing.p}

{t.financing.steps.map((s, i) => (
0{i+1}
{s.h}

{s.p}

))}
)} ); } // ───────────────────────────────────────────────────────────────────────── // SHOP // ───────────────────────────────────────────────────────────────────────── function ShopPage({ t, navigate, financingMode, layoutDensity, initialCategory }) { const [cat, setCat] = useState(initialCategory || "All"); const [maker, setMaker] = useState("all"); // all | own | partner const [priceBand, setPriceBand] = useState(null); const [sort, setSort] = useState(0); const filtered = useMemo(() => { let list = window.PRODUCTS; if (cat !== "All") list = list.filter((p) => p.cat === cat); if (maker === "own") list = list.filter((p) => p.own); if (maker === "partner") list = list.filter((p) => !p.own); if (priceBand) { list = list.filter((p) => p.price >= priceBand[0] && p.price < priceBand[1]); } list = [...list]; if (sort === 2) list.sort((a, b) => a.price - b.price); if (sort === 3) list.sort((a, b) => b.price - a.price); return list; }, [cat, maker, priceBand, sort]); const cats = ["All", ...new Set(window.PRODUCTS.map((p) => p.cat))]; const priceBands = [ ["Under $500", [0, 500]], ["$500 – $1,000", [500, 1000]], ["$1,000 – $2,000", [1000, 2000]], ["$2,000 – $3,000", [2000, 3000]], ["$3,000+", [3000, 99999]], ]; return (

{cat === "All" ? t.shop.h : cat}

{t.shop.sub(filtered.length)}
{filtered.map((p) => ( navigate("product", id)}/> ))}
); } // ───────────────────────────────────────────────────────────────────────── // PRODUCT DETAIL // ───────────────────────────────────────────────────────────────────────── function ProductPage({ t, navigate, financingMode, onAddToCart, id }) { const p = window.PRODUCTS.find((x) => x.id === id) || window.PRODUCTS[0]; const [sw, setSw] = useState(0); const [size, setSize] = useState(0); const [qty, setQty] = useState(1); const [openTabs, setOpenTabs] = useState({ details: true }); const related = window.PRODUCTS.filter((x) => x.cat === p.cat && x.id !== p.id).slice(0, 4); return (
{e.preventDefault();navigate("shop");}}> {t.pdp.back}
{p.cat} · {p.sub}

{p.name}

${p.price.toLocaleString()} {p.was && ${p.was.toLocaleString()}}
{p.finance > 0 && financingMode !== "off" && ( financingMode === "loud" ? (
{t.pdp.financeLoud(p.finance)}
Soft credit check · Decision in minutes
) : financingMode === "normal" ? (
{t.pdp.financeQuiet(p.finance)}
) : (
{t.pdp.financeQuiet(p.finance)}
) )}
{t.pdp.color} {["Oxblood","Caramel","Navy","Olive","Brass"][sw] || "Oxblood"}
{p.swatches.map((c, i) => (
setSw(i)}/> ))}
{p.sizes.length > 1 && ( <>
{t.pdp.size}
{p.sizes.map((s, i) => ( ))}
)}
{t.pdp.qty}
setQty(Math.max(1, +e.target.value || 1))}/>
{t.pdp.trust[0].h}{t.pdp.trust[0].p}
{t.pdp.trust[1].h}{t.pdp.trust[1].p}
{t.pdp.trust[2].h}{t.pdp.trust[2].p}
{t.pdp.tabs.details}

{p.desc}

{t.pdp.tabs.specs}
{Object.entries(p.specs).map(([k, v]) =>
{k}
{v}
)}
{t.pdp.tabs.delivery}

Free white-glove delivery within Miami-Dade for orders over $999. Standard delivery $149. Workshop pieces ship in 4-6 weeks. In-stock partner pieces ship in 1-2 weeks. Includes placement and packing-material removal.

{t.pdp.tabs.returns}

30-day comfort guarantee on every order. Custom workshop pieces carry a lifetime frame warranty. Partner pieces follow the maker's warranty (typically 5-10 years on frames, 1 year on upholstery).

{/* Related */}
More from {p.cat}} />
{related.map((rp) => ( navigate("product", id)}/> ))}
); } // ───────────────────────────────────────────────────────────────────────── // CART // ───────────────────────────────────────────────────────────────────────── function CartPage({ t, navigate, cart, setCart, financingMode }) { const lines = cart.map((c) => { const p = window.PRODUCTS.find((x) => x.id === c.id); return { ...p, qty: c.qty, color: c.color, size: c.size }; }); const subtotal = lines.reduce((s, l) => s + l.price * l.qty, 0); const delivery = subtotal >= 999 ? 0 : subtotal > 0 ? 149 : 0; const tax = Math.round(subtotal * 0.07); const total = subtotal + delivery + tax; const monthly = Math.round(total / 12); function setQty(i, q) { if (q <= 0) { const next = [...cart]; next.splice(i, 1); setCart(next); } else { const next = [...cart]; next[i] = { ...next[i], qty: q }; setCart(next); } } if (!cart.length) { return (

{t.cart.h}

{t.cart.empty}

); } return (

{t.cart.h}

{lines.map((l, i) => (
{l.cat} · {l.sub}

{l.name}

{l.sizes[l.size]}
{ e.preventDefault(); setQty(i, 0); }}>{t.cart.remove}
${(l.price * l.qty).toLocaleString()}
{l.was &&
${(l.was * l.qty).toLocaleString()}
}
))}
); } // ───────────────────────────────────────────────────────────────────────── // CHECKOUT // ───────────────────────────────────────────────────────────────────────── function CheckoutPage({ t, navigate, cart, financingMode }) { const [pay, setPay] = useState("card"); const lines = cart.map((c) => ({ ...window.PRODUCTS.find((x) => x.id === c.id), qty: c.qty, color: c.color, size: c.size })); const subtotal = lines.reduce((s, l) => s + l.price * l.qty, 0); const delivery = subtotal >= 999 ? 0 : subtotal > 0 ? 149 : 0; const tax = Math.round(subtotal * 0.07); const total = subtotal + delivery + tax; const monthly = Math.round(total / 12); return (

{t.co.h}

{t.co.contact}

{t.co.ship}

{t.co.pay}

{pay === "card" && (
)}
); } // ───────────────────────────────────────────────────────────────────────── // ABOUT / WORKSHOP // ───────────────────────────────────────────────────────────────────────── function AboutPage({ t, navigate }) { return (
{t.about.eyebrow}

{t.about.h.a} {t.about.h.em}

{t.about.p}

{t.about.pillars.map((pl, i) => (
0{i+1} · {["The build","The price","The pace"][i]}

{pl.h}

{pl.p}

))}
); } // ───────────────────────────────────────────────────────────────────────── // CONTACT / SHOWROOM // ───────────────────────────────────────────────────────────────────────── function ContactPage({ t }) { return (
{t.nav.showroom}

{t.contact.h.a} {t.contact.h.em}

{t.contact.p}

{t.contact.visit}

{t.contact.visitText}

{t.contact.hours}

{t.contact.hoursText}

{t.contact.call}

{t.contact.callText}

{t.contact.whatsapp}

{t.contact.whatsappText}

{t.contact.email}

{t.contact.emailText}

Get directions
Unique · Little Haiti
8421 NE 2nd Ave
Maps
); } // ───────────────────────────────────────────────────────────────────────── // COLLECTIONS landing (light page — themed groupings) // ───────────────────────────────────────────────────────────────────────── function CollectionsPage({ t, navigate, financingMode }) { return (
Collections

Five rooms, one signature.

Each of our collections is a complete room: matching pieces, considered together. Mix or stay within a single line — both work.

{window.COLLECTIONS.map((c, idx) => { const tone = (idx % 6) + 1; const inCollection = window.PRODUCTS.slice(idx * 2, idx * 2 + 3); return (
{c.split(" · ")[0]}
{c.split(" · ")[1]}} cta="See full collection" onCta={() => navigate("shop")} />
{inCollection.map((p) => (
navigate("product", p.id)}>
))}
); })}
); } // ───────────────────────────────────────────────────────────────────────── // WORKSHOP page (story-driven) // ───────────────────────────────────────────────────────────────────────── function WorkshopPage({ t, navigate }) { return (
The Workshop

A four-person team, twelve years together.

One block north of the showroom, on a quiet stretch of NE 2nd Avenue, is the room where about a third of our catalog is actually built. Hardwood comes in raw. Sofas leave finished. Everything in between happens here.

{[ { name: "01 · Selecting the lumber", tone: 5 }, { name: "02 · The frame", tone: 3 }, { name: "03 · Eight-way hand-tied", tone: 2 }, { name: "04 · Foam & wrap", tone: 4 }, { name: "05 · Upholstery", tone: 1 }, { name: "06 · The stamp", tone: 6 }, ].map((s, i) => (
))}
Look for the stamp

Every piece we build carries the same mark.

A small brass-stamped seal on the underside of every workshop piece. It's how you know — and how we know. On the site, look for the "Crafted by us" tag on a product card.

); } Object.assign(window, { HomePage, ShopPage, ProductPage, CartPage, CheckoutPage, AboutPage, ContactPage, CollectionsPage, WorkshopPage });