/* app.jsx — main router, tweaks, mounts everything */ const FONT_MAP = { cormorant: '"Cormorant Garamond", "Times New Roman", serif', playfair: '"Playfair Display", "Times New Roman", serif', italiana: '"Italiana", serif', dmserif: '"DM Serif Display", serif', }; const TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{ "palette": "ivory-light", "displayFont": "cormorant", "density": "editorial", "showTrust": true, "showTestimonial": true, "showInstagram": true, "showConsultBar": true }/*EDITMODE-END*/; const App = () => { const [tweaks, setTweak] = window.useTweaks(TWEAK_DEFAULTS); const initialRoute = ['home', 'bespoke', 'product'].includes(window.__BYTESGLUE_SHOWCASE_ROUTE) ? window.__BYTESGLUE_SHOWCASE_ROUTE : 'home'; const [route, setRoute] = React.useState(initialRoute); const [productId, setProductId] = React.useState('aureveris'); const [drawerOpen, setDrawerOpen] = React.useState(false); const [drawerPrefill, setDrawerPrefill] = React.useState(null); const [locale, setLocale] = React.useState('en'); const openConsult = () => { setDrawerPrefill(null); setDrawerOpen(true); }; const openPiecedConsult = (id) => { setDrawerPrefill({piece: id, occasion: 'Engagement'}); setDrawerOpen(true); }; // expose nav helper for the wordmark React.useEffect(() => { window.__nav = setRoute; }, []); // apply palette + density + display font React.useEffect(() => { document.documentElement.setAttribute('data-palette', tweaks.palette); document.documentElement.setAttribute('data-density', tweaks.density); document.documentElement.style.setProperty('--font-display', FONT_MAP[tweaks.displayFont] || FONT_MAP.cormorant); }, [tweaks.palette, tweaks.density, tweaks.displayFont]); return (
{route === 'home' && } {route === 'bespoke' && } {route === 'product' && }