/* global React, Icon, Logo */ const { useState: useStateSearch } = React; // shared dataset const ROOMS = [ { id: "rm-001", title: "Sunny private room near MLK station", area: "West Oakland, CA", host: "Dana K.", price: 685, type: "Private room", beds: 1, tone: "a", tags: ["Vouchers", "Pet OK", "Furnished"], rating: 4.9, reviews: 47, avail: "May 8" }, { id: "rm-002", title: "Quiet upstairs room, shared kitchen", area: "Bushrod, Oakland", host: "Marco V.", price: 540, type: "Private room", beds: 1, tone: "b", tags: ["Sober living", "Vouchers"], rating: 4.8, reviews: 31, avail: "May 5" }, { id: "rm-003", title: "Ground-floor accessible room", area: "Fruitvale, Oakland", host: "Ana R.", price: 720, type: "Private room", beds: 1, tone: "c", tags: ["Wheelchair", "Vouchers"], rating: 5.0, reviews: 22, avail: "May 12" }, { id: "rm-004", title: "Shared room in 4-bed home", area: "East Oakland", host: "Jamal P.", price: 320, type: "Shared room", beds: 2, tone: "d", tags: ["Women only", "Sober living"], rating: 4.7, reviews: 64, avail: "May 4" }, { id: "rm-005", title: "Studio with private bath", area: "Adams Point", host: "Theo M.", price: 980, type: "Studio", beds: 1, tone: "e", tags: ["Vouchers", "Furnished"], rating: 4.9, reviews: 18, avail: "May 15" }, { id: "rm-006", title: "Cozy room in family duplex", area: "Temescal, Oakland", host: "Priya S.", price: 610, type: "Private room", beds: 1, tone: "a", tags: ["Pet OK", "Furnished"], rating: 4.8, reviews: 39, avail: "May 7" }, { id: "rm-007", title: "Re-entry housing room", area: "San Antonio, Oakland", host: "Reach Forward", price: 410, type: "Private room", beds: 1, tone: "b", tags: ["Re-entry", "Sober living"], rating: 4.9, reviews: 91, avail: "Now" }, { id: "rm-008", title: "Veteran preferred private room", area: "Lakeshore, Oakland", host: "James W.", price: 750, type: "Private room", beds: 1, tone: "c", tags: ["HUD-VASH", "Vouchers"], rating: 4.9, reviews: 28, avail: "May 6" }, ]; window.ROOMS = ROOMS; const PageSearch = ({ onNav }) => { const [view, setView] = useStateSearch("grid"); const [active, setActive] = useStateSearch(["Vouchers"]); const filters = ["Vouchers", "Sober living", "Wheelchair", "Pet OK", "Women only", "HUD-VASH", "Re-entry", "Furnished", "Short term"]; const toggle = (t) => setActive(a => a.includes(t) ? a.filter(x => x !== t) : [...a, t]); return (
{/* Refined search bar */}
Oakland, CA
Anytime
Up to $1,000
{filters.map(f => ( toggle(f)}>{f} ))}
{view === "grid" ? (

{ROOMS.length} rooms in Oakland

Sort by
{ROOMS.map(r => onNav("listing", { id: r.id })} />)}
) : (
{ROOMS.map(r => onNav("listing", { id: r.id })} />)}
)}
); }; const RoomCard = ({ r, onClick, compact }) => (
{r.type === "Shared room" ? "Shared" : r.type} Available {r.avail}

{r.title}

{r.rating}

{r.area} · {r.host}

{r.tags.slice(0, 3).map(t => {t})}
${r.price} / month {r.reviews} reviews
); const MapPlaceholder = () => (
{[ [220, 280, 685], [380, 220, 540], [560, 320, 720], [320, 480, 320], [480, 540, 980], [600, 460, 610], [240, 600, 410], [440, 380, 750] ].map(([x, y, p], i) => (
${p}
))}
Showing 8 rooms in viewport
); const PageListing = ({ onNav, params }) => { const r = ROOMS.find(x => x.id === params?.id) || ROOMS[0]; return (
{/* Title row */}

{r.title}

{r.rating} · {r.reviews} reviews · {r.area} · Verified host
{/* Photo grid */}
{/* Host strip */}

Hosted by {r.host}

Superhost · 3 years on Roomly · 47 stays completed

{r.host[0]}
{/* Room facts */}

Room facts

{[ { i: "bed", t: "Private bedroom · twin bed", d: "Furnished, with desk + lockable closet" }, { i: "users", t: "Shared with 3 housemates", d: "Quiet hours 10pm–7am" }, { i: "key", t: "Personal key + smart lock", d: "Coded entry, no shared keys" }, { i: "cash", t: "$685/month · utilities included", d: "WiFi, heat, water" }, { i: "shield", t: "Background-checked household", d: "All adults run through Persona" }, { i: "calendar", t: "Min stay 30 days", d: "Month-to-month after first 30" }, ].map(f => (
{f.t} {f.d}
))}

{/* About */}

About this room

Spacious upstairs bedroom in a calm, three-bedroom craftsman two blocks from the West Oakland BART. Shared kitchen and a sunny back porch. We're a quiet household — two students and one part-time nurse — and we're looking for a respectful new housemate who values clean common spaces.

We accept HUD-VASH, Section 8, and Emergency Housing Vouchers. Case workers welcome on tours. The room is fully furnished — twin bed, desk, lamp, dresser — and ready to move in.


{/* Programs accepted */}

Programs accepted

{["HUD-VASH", "Section 8 (HCV)", "EHV", "Veterans Affairs", "Bay Area Outreach", "Roots Recovery"].map(p => ( {p} ))}

{/* Reviews */}

Reviews · {r.reviews}

{r.rating} average
{[ { n: "Carla T.", d: "March 2026", t: "Dana was so kind. She picked me up from the bus station and showed me the room before I even committed. The house is quiet and I sleep through the night for the first time in a year." }, { n: "Reggie W.", d: "February 2026", t: "Fair price, clean room, and Dana checks in once a week to make sure things are good. My case worker had no trouble with paperwork." }, { n: "Yasmin H.", d: "January 2026", t: "I felt safe here. The lock works, the lights work, the shower is hot. That's a lot." }, { n: "Mike R.", d: "December 2025", t: "First stable address I've had in three years. Just signed a six-month extension." }, ].map((rev, i) => (
{rev.n[0]}
{rev.n} {rev.d}

"{rev.t}"

))}
{/* Reservation card */}
); }; window.PageSearch = PageSearch; window.PageListing = PageListing;