// Inboxli — main app entry // Tweaks: hero copy (3 presets + free edit) + vibe (mellow / terakota / studio) const TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{ "vibe": "studio", "heroVariant": "retencija", "heroBefore": "You spend 80% of your budget on new customers, ", "heroMarker": "but they never", "heroItalic": "buy again.", "heroAfter": "", "heroSub": "Your best customers are already on your list. They just need a reason to come back - and that is exactly what we build.", "heroCta": "Get my audit", "heroSecondary": "See the results" }/*EDITMODE-END*/; function App() { const [t, setTweak] = useTweaks(TWEAK_DEFAULTS); const lang = useLang(); const copy = INBOXLI_COPY[lang]; React.useEffect(() => { document.title = copy.docTitle; }, [lang]); // apply vibe to
React.useEffect(() => { document.body.setAttribute("data-vibe", t.vibe || "mellow"); }, [t.vibe]); const applyPreset = (key, l) => { const p = INBOXLI_COPY[l || lang].hero.presets[key]; if (!p) return; setTweak({ heroVariant: key, heroBefore: p.before, heroMarker: p.marker, heroItalic: p.italic, heroAfter: p.after, heroSub: p.sub, heroCta: p.cta, heroSecondary: p.secondary }); }; // Hero copy follows the active language const firstRun = React.useRef(true); React.useEffect(() => { if (firstRun.current) { firstRun.current = false; const p = INBOXLI_COPY[lang].hero.presets[t.heroVariant || "retencija"]; if (p && t.heroBefore !== p.before) applyPreset(t.heroVariant || "retencija", lang); return; } applyPreset(t.heroVariant || "retencija", lang); }, [lang]); // Quiz lives on its own page now — every audit CTA routes there. React.useEffect(() => { const onClick = (e) => { const trigger = e.target.closest("[data-open-form]"); if (trigger) { e.preventDefault(); if (window.__inboxliRouter) window.__inboxliRouter.toKviz(); else window.location.href = "kviz.html"; } }; document.addEventListener("click", onClick); return () => document.removeEventListener("click", onClick); }, []); return ( <>{copy.journey.lead}