// Listings index — filters + grid + map toggle const ListingsPage = ({ openListing, faves, toggleFav }) => { useLucide(); const [view, setView] = React.useState('grid'); // grid | map const [filters, setFilters] = React.useState({ type: 'all', // House, Townhouse, Condo minBeds: 0, priceBand: 'all', sort: 'newest', }); const filtered = SITE_DATA.listings.filter(l => { if (filters.type !== 'all' && l.type !== filters.type) return false; if (l.beds < filters.minBeds) return false; if (filters.priceBand === 'u750' && l.price >= 750000) return false; if (filters.priceBand === '750-1.2' && (l.price < 750000 || l.price >= 1200000)) return false; if (filters.priceBand === '1.2-2' && (l.price < 1200000 || l.price >= 2000000)) return false; if (filters.priceBand === '2+' && l.price < 2000000) return false; return true; }); const sorted = [...filtered].sort((a, b) => { if (filters.sort === 'price-asc') return a.price - b.price; if (filters.sort === 'price-desc') return b.price - a.price; if (filters.sort === 'beds') return b.beds - a.beds; return 0; }); return (
{SITE_DATA.listings.length} properties I'm representing across Metro Vancouver. Filter by type, beds, or budget — or switch to map view to explore by location.
No homes match these filters. Try widening your search.