/* Work page gallery — editorial index with cursor-following preview, plus a framed grid view. */ function WorkStage() { const all = window.PORTFOLIO; const cats = window.CATEGORIES; const [cat, setCat] = React.useState('All'); const [view, setView] = React.useState('index'); const [hot, setHot] = React.useState(null); const wrap = React.useRef(null); const list = React.useMemo(() => (cat === 'All' ? all : all.filter((p) => p.c === cat)), [cat, all]); const move = (e) => { const el = wrap.current; if (!el) return; const r = el.getBoundingClientRect(); el.style.setProperty('--px', (e.clientX - r.left) + 'px'); el.style.setProperty('--py', (e.clientY - r.top) + 'px'); }; return (
{cats.map((c) => ( ))}
{['index', 'grid'].map((v) => ( ))}
{view === 'index' ? ( <>
    setHot(null)}> {list.map((p, n) => (
  1. ))}
) : (
{list.map((p, n) => (
))}
)}
); } Object.assign(window, { WorkStage });