/* ============================================================ WorkStay — Explore / Search (editorial, not marketplace grid) exports: ExplorePage ============================================================ */ const { useState: useStateEx, useMemo } = React; function PropertyRow({ p, go, wished, toggleWish, i }) { const [hov, setHov] = useStateEx(false); const flip = i % 2 === 1; return (
setHov(true)} onMouseLeave={() => setHov(false)} style={{ display: 'grid', gridTemplateColumns: flip ? '1fr 1.15fr' : '1.15fr 1fr', gap: 'clamp(28px,4vw,64px)', alignItems: 'center', paddingBlock: 'clamp(40px,5vw,72px)', borderTop: '1px solid var(--line)' }} className="ws-prow"> {/* visual */} {/* copy */}
{p.collection}
{p.city}, {p.country}

{p.tagline}

{p.amenities.slice(0, 4).map(a => ( {a} ))}
${p.price.toLocaleString()} / {p.period}
go('property', { id: p.id })}>View work profile
); } function ExplorePage({ go, params = {}, wish = [], toggleWish }) { const { PROPERTIES, COLLECTIONS } = window.WS_DATA; const [filter, setFilter] = useStateEx(params.collection || 'All'); const [sort, setSort] = useStateEx('work'); const wishOnly = params.wishOnly; const filters = ['All', ...COLLECTIONS.map(c => c.title)]; const list = useMemo(() => { let r = PROPERTIES.slice(); if (wishOnly) r = r.filter(p => wish.includes(p.id)); else if (filter !== 'All') r = r.filter(p => p.collection === filter); if (sort === 'work') r.sort((a, b) => b.workScore - a.workScore); if (sort === 'price') r.sort((a, b) => a.price - b.price); if (sort === 'speed') r.sort((a, b) => b.speed - a.speed); return r; }, [filter, sort, wishOnly, wish]); return (
{/* header */}
{wishOnly ? 'Your wishlist' : 'Explore work-ready stays'}

{wishOnly ? <>Spaces you’re keeping in mind. : <>Find the room that makes the work happen.}

{/* filter rail */} {!wishOnly && (
{filters.map(f => setFilter(f)}>{f})}
Sort {[['work', 'Work Score'], ['price', 'Price'], ['speed', 'Speed']].map(([k, l]) => setSort(k)}>{l})}
)} {/* results */}
{list.length} {list.length === 1 ? 'space' : 'spaces'} · verified this month
{list.length === 0 && (

Nothing saved yet — tap the heart on any space.

go('explore')}>Browse stays
)} {list.map((p, i) => )}
{/* nearby / map band */} {!wishOnly && }
); } /* dark interactive-feeling city map with best-work-zones heatmap */ function MapBand() { const { NEARBY } = window.WS_DATA; const iconFor = { Coworking: 'desk', Cafe: 'coffee', Metro: 'train', Gym: 'dumbbell', Grocery: 'cart' }; const [active, setActive] = useStateEx(null); return (
Location intelligence

The best remote-work zones, mapped.

A heatmap of where focus actually happens — coworking, fast cafés, transit, and the quiet pockets in between.

{NEARBY.map((n, i) => ( ))}
{/* map grid */}
{/* roads */} {/* heat zones */}
{/* pins */} {NEARBY.map((n, i) => (
))} {/* home marker */}
Best remote-work zones
); } Object.assign(window, { ExplorePage, MapBand });