/* V2 Home — simplified, plain-language, benefit-first (still compliant). */ /* ===================== HERO BANNER — 3 variants + mini devbar ===================== */ const HERO_VARIANTS = [ { key: 'cell', label: 'Cellular', hint: 'Live cell-grid over the vial' }, { key: 'pastel', label: 'Pastel', hint: 'Soft diagonal bottle drift' }, { key: 'halo', label: 'Halo', hint: 'Spinning light halo + ripples' }, ]; /* Bestseller slideshow source — names must exist in VC_PRODUCTS */ const HERO_SLIDE_NAMES = ['Retatrutide 10 mg', 'Tesamorelin', 'GLOW', 'BPC-157', 'NAD+', 'Ipamorelin']; function useHeroSlides(intervalMs = 8500) { const imgs = window.VC_PRODUCT_IMG || {}; const prods = window.VC_PRODUCTS || []; const slides = React.useMemo(() => HERO_SLIDE_NAMES .map((n) => { const p = prods.find((x) => x.name === n); return p ? { name: p.name, cat: p.catLabel, img: imgs[p.name] || '/vital/img/cellular.jpg' } : null; }) .filter(Boolean), []); const [i, setI] = React.useState(0); const [prev, setPrev] = React.useState(null); React.useEffect(() => { if (slides.length < 2) return; const t = setInterval(() => { setI((c) => { setPrev(c); return (c + 1) % slides.length; }); }, intervalMs); return () => clearInterval(t); }, [slides.length, intervalMs]); return { slides, i, prev, setI }; } function HeroSlideLabel({ slide, index }) { return (
Bestseller · {slide.cat} {slide.name}
); } function HeroSlideDots({ n, i, onPick }) { return ( ); } function ScrollToBestSellers({ light }) { return ( ); } /* A — the original cellular grid animation, now a bestseller slideshow */ function HeroCellular() { const { slides, i, prev, setI } = useHeroSlides(); const cur = slides[i]; return (
{prev != null && slides[prev] && (
)} {cur && (
{cur.name}
)}
{/* drifting colour mesh over the product */}