/* global window, React, ReactDOM */ // ============================================================= // LANDING — composes all sections into a single responsive page. // // The design prototype mounted three fixed-width artboards (desktop / // tablet / mobile) inside a pan/zoom DesignCanvas. For the shipped page // we render ONE LandingPage and drive the existing `data-bp` styling from // the live viewport width, so the whole design-canvas layer is dropped. // ============================================================= function LandingPage({ bp }) { return (
); } // Map the live viewport width onto the design's three breakpoints. // Thresholds mirror the prototype artboards (mobile 390 · tablet 820 · desktop 1440). function currentBp() { const w = window.innerWidth; if (w < 768) return "mobile"; if (w < 1080) return "tablet"; return "desktop"; } function useBreakpoint() { const [bp, setBp] = React.useState(currentBp); React.useEffect(() => { let raf = 0; const onResize = () => { cancelAnimationFrame(raf); raf = requestAnimationFrame(() => setBp(currentBp())); }; window.addEventListener("resize", onResize); return () => { cancelAnimationFrame(raf); window.removeEventListener("resize", onResize); }; }, []); return bp; } function App() { const bp = useBreakpoint(); return ; } const root = ReactDOM.createRoot(document.getElementById("root")); root.render();