/* Sora Well Bar — shared website components */
const { useState, useEffect } = React;
// ---- Crest logo (arch + figure mark + Sora / Well Bar) ----
const CrestMark = ({ stroke }) => (
);
const Crest = ({ go }) => (
go && go('home')}>
Sora
Well Bar
);
// ---- Navigation ----
const NAV = [
['home', 'Home'], ['about', 'About'], ['movement', 'Movement'],
['membership', 'Membership'], ['experiences', 'Experiences'],
['corporate', 'Corporate Wellness'], ['contact', 'Contact'],
];
const Nav = ({ route, go }) => {
const [scrolled, setScrolled] = useState(false);
const [open, setOpen] = useState(false);
const [isMobile, setIsMobile] = useState(false);
useEffect(() => {
const onScroll = () => setScrolled(window.scrollY > 40);
window.addEventListener('scroll', onScroll);
return () => window.removeEventListener('scroll', onScroll);
}, []);
// Track viewport so the mobile menu is only ever in the DOM on small screens
useEffect(() => {
const mq = window.matchMedia('(max-width: 980px)');
const sync = () => setIsMobile(mq.matches);
sync();
mq.addEventListener('change', sync);
return () => mq.removeEventListener('change', sync);
}, []);
// Close the menu whenever we leave mobile widths
useEffect(() => { if (!isMobile) setOpen(false); }, [isMobile]);
// Lock page scroll while the mobile menu is open
useEffect(() => {
document.body.style.overflow = open ? 'hidden' : '';
return () => { document.body.style.overflow = ''; };
}, [open]);
const handleGo = (id) => { setOpen(false); go(id); };
return (
{isMobile && (
)}
);
};
// ---- Ticker ----
const TICKER = [
'First Class Complimentary', 'Founding Circle — $165/mo · First 25',
'The Monthly Circle — $195/mo', 'Community Rate — $179/mo',
'Drop‑In — $34', '10‑Class Pack — $300', 'Towel Service Included',
'Members First to Every Event',
];
const Ticker = () => (
{[0,1].map(rep => TICKER.map((t,i) =>
{t}✦
))}
);
// ---- Footer ----
const Footer = ({ go }) => (
);
// ---- Page hero (interior pages) ----
const PageHero = ({ eyebrow, title, sub }) => (
);
Object.assign(window, { CrestMark, Crest, Nav, Ticker, Footer, PageHero });