// Strawberry Fields — main app
// All sections live here. Editorial layout, real data, original visual system.
const { useState, useEffect, useMemo, useRef, useCallback } = React;
// Format AED price — never invent
const aed = (n) => {
const num = typeof n === "string" ? parseFloat(n) : n;
return num.toLocaleString("en-AE", { minimumFractionDigits: 0, maximumFractionDigits: 2 });
};
// ---------- Brand mark (original — strawberry + hand-set wordmark) ----------
function BrandMark({ size = 28, withWord = true }) {
return (
{withWord && Strawberry Fields }
);
}
// ---------- Utility strip (delivery, hours, locale) ----------
function UtilityStrip({ locale, onLocale }) {
return (
Free delivery in the UAE
Open Tue–Sun, 09:30–19:30 · Alserkal Avenue WH G58
onLocale("en")}
style={{ fontWeight: locale === "en" ? 700 : 400, opacity: locale === "en" ? 1 : 0.7 }}
>EN
·
onLocale("ar")}
style={{ fontWeight: locale === "ar" ? 700 : 400, opacity: locale === "ar" ? 1 : 0.7, fontFamily: "Noto Kufi Arabic, var(--body)" }}
>ع
);
}
// ---------- Header / nav ----------
function Header({ cartCount, onOpenCart, locale, onLocale, onJump }) {
const [openMenu, setOpenMenu] = useState(null); // "shop" | "happenings" | null
const timerRef = useRef();
const handleEnter = (key) => {
clearTimeout(timerRef.current);
setOpenMenu(key);
};
const handleLeave = () => {
timerRef.current = setTimeout(() => setOpenMenu(null), 120);
};
return (
);
}
// ---------- Hero ----------
function Hero({ onShop }) {
return (
{/* decorative motifs */}
A curated children's design house
A world of magic
& imagination for
the next generation.
Five hundred and fifteen carefully chosen objects from forty-eight design houses — and a real-life
Hidden Playground at Alserkal Avenue, Dubai. Sustainable, design-led, parent-trusted.
515 objects in store
48 design houses
WH G58 Alserkal Avenue, Dubai
Little Lights · Train
Hibou Home · Wallpaper
);
}
// ---------- Marquee divider ----------
function Marquee() {
const items = [
"Sustainable", "Design-led", "Educational", "Parent-trusted", "Alserkal Avenue WH G58",
"Hidden Playground", "48 design houses", "Made for ages 0–8",
];
const seq = (
{items.map((t, i) => (
{t}
))}
);
return (
);
}
// ---------- Shop by world ----------
function Worlds() {
return (
{WORLDS.map(w => (
{w.title}
{w.count} objects
→
))}
);
}
// ---------- Curated picks ----------
function Picks({ onAdd }) {
const [tab, setTab] = useState("editor");
const filtered = useMemo(() => {
const uniq = (arr) => {
const seen = new Set();
return arr.filter(p => seen.has(p.id) ? false : (seen.add(p.id), true));
};
if (tab === "editor") return uniq(PRODUCTS.filter(p => p.tags.includes("editor")).concat(PRODUCTS)).slice(0, 8);
if (tab === "new") return uniq(PRODUCTS.filter(p => p.tags.includes("new")).concat(PRODUCTS.slice(8))).slice(0, 8);
if (tab === "under100") return uniq(PRODUCTS.filter(p => parseFloat(p.price) < 100)).slice(0, 8);
if (tab === "heirloom") return uniq(PRODUCTS.filter(p => parseFloat(p.price) >= 500)).slice(0, 8);
return PRODUCTS.slice(0, 8);
}, [tab]);
return (
From our shelves
Curated, this week.
{PICK_TABS.map(t => (
setTab(t.id)}
>{t.label}
))}
{filtered.map(p => (
onAdd(p)}>
{p.tags.includes("new") &&
New }
{p.tags.includes("editor") &&
Editor }
{p.tags.includes("collab") &&
SF × collab }
{p.tags.includes("local") &&
Local voice }
{ e.stopPropagation(); onAdd(p); }}>+
{p.vendor}
{p.title}
{p.tags.includes("from") ? "From " : ""}AED {aed(p.price)}
))}
);
}
window.__sfApp1 = { BrandMark, UtilityStrip, Header, Hero, Marquee, Worlds, Picks, aed };