/* global React */
const { useState, useEffect, useRef } = React;
/* ---------- Icons ---------- */
const Icon = {
arrow: (props) => (
),
menu: () => (
),
close: () => (
),
instagram: () => (
),
tiktok: () => (
),
youtube: () => (
),
// Pillar icons — minimal line
sim: () => (
),
apparel: () => (
),
building: () => (
),
community: () => (
),
gate: () => (
),
style: () => (
),
};
/* ---------- Photo Placeholder ---------- */
function Photo({ caption, dark=false, aspect=null, style={}, className='', tag=true, src=null, alt='', objectPosition='center' }) {
const s = { ...style };
if (aspect) s.aspectRatio = aspect;
return (
{src && (

)}
{tag && !src &&
}
{caption && !src &&
{caption}}
);
}
/* ---------- Navigation ---------- */
function Nav({ current, go, onDark=false }) {
const [open, setOpen] = useState(false);
const [scrolled, setScrolled] = useState(false);
useEffect(() => {
const onScroll = () => setScrolled(window.scrollY > 20);
window.addEventListener('scroll', onScroll);
return () => window.removeEventListener('scroll', onScroll);
}, []);
const links = [
['our-story', 'About'],
['rentals', 'Rentals'],
['apparel', 'Apparel'],
['the-club', 'Club'],
['contact', 'Contact'],
];
return (
<>
{links.map(([k, label]) => (
))}
>
);
}
/* ---------- Footer ---------- */
function Footer({ go }) {
return (
);
}
/* ---------- Toast ---------- */
function useToast() {
const [msg, setMsg] = useState(null);
const show = (m) => {
setMsg(m);
setTimeout(() => setMsg(null), 3400);
};
const node = msg ? {msg}
: null;
return [show, node];
}
/* ---------- Reveal on scroll ---------- */
function Reveal({ children, delay = 0, as: Tag='div', ...rest }) {
const ref = useRef(null);
const [seen, setSeen] = useState(false);
useEffect(() => {
const el = ref.current;
if (!el) return;
const io = new IntersectionObserver(([e]) => {
if (e.isIntersecting) { setSeen(true); io.disconnect(); }
}, { threshold: 0.12 });
io.observe(el);
return () => io.disconnect();
}, []);
return (
{children}
);
}
Object.assign(window, { Icon, Photo, Nav, Footer, useToast, Reveal });