// app.jsx — main app shell, tweaks panel, hero switcher, HIW & pricing renderers const { useState, useEffect } = React; // Forward email handler to global window.handleSubscribe = function(e) { e.preventDefault(); const emailInput = e.target.querySelector('input[type="email"]'); const email = emailInput ? emailInput.value.trim() : ''; if (email) { try { sessionStorage.setItem('smf_pending_email', email); } catch (_) {} } window.location.href = 'pricing.html'; }; // ─── HOW IT WORKS steps ─── const steps = [ { num: 1, title: 'Subscribe', body: 'Choose monthly or annual. One price, no upsells. Only the deals worth your attention get sent to you.' }, { num: 2, title: 'Our filters do the work', body: 'We scan hundreds of SMF routes and apply smart filters — nonstop preference, realistic savings thresholds, and routes that matter to Sacramento travelers.' }, { num: 3, title: 'You get the alert', body: 'When a real deal lands, you get notified by email with the price, dates, airline, and everything you need to decide in 30 seconds.' }, { num: 4, title: 'Book your flight', body: 'Use the booking link in your alert to view the flight, adjust dates, and lock in your savings — directly through the airline or your preferred platform.' }, ]; const stepIcons = [ // mail , // filter , // bell , // plane , ]; function HowItWorks() { return ( <> {steps.map((s, i) => (
{s.num}
{stepIcons[i]}

{s.title}

{s.body}

))} ); } // ─── Pricing as boarding passes ─── function Pricing() { return ( <> ); } function Ticket({ featured, code, dest, codeLabel, destLabel, cabin, priceWhole, priceCents, period, features, href, ctaLabel }) { return (
✈ DEAL ALERTS {cabin}
{code} {codeLabel}
{dest} {destLabel}
${priceWhole} .{priceCents}
{period}
    {features.map((f, i) => (
  • {f}
  • ))}
{ctaLabel}
); } // ─── App: hero switcher + tweaks panel ─── function App() { const [tweaks, setTweak] = useTweaks(window.TWEAK_DEFAULTS); const variant = tweaks.heroVariant || 'skyline'; const HeroComponent = variant === 'editorial' ? window.HeroEditorial : variant === 'postcard' ? window.HeroPostcard : window.HeroSkyline; return ( <> setTweak('heroVariant', v)} options={[ { value: 'skyline', label: 'Skyline' }, { value: 'editorial', label: 'Editorial' }, { value: 'postcard', label: 'Postcard' }, ]} /> ); } // Mount hero (+ tweaks) const heroMount = document.getElementById('hero-mount'); ReactDOM.createRoot(heroMount).render(); // Mount HIW steps into pre-existing container const hiwMount = document.getElementById('hiw-grid'); ReactDOM.createRoot(hiwMount).render(); // Mount pricing const priceMount = document.getElementById('pricing-mount'); ReactDOM.createRoot(priceMount).render();