/* App.jsx (same UI as before, SPA) */ const { useMemo, useState } = React; function App() { const [route, setRoute] = useState("home"); const [query, setQuery] = useState(""); const [category, setCategory] = useState("All Categories"); const [location, setLocation] = useState("All Cambodia"); const [showLogin, setShowLogin] = useState(false); const categories = [ "All Categories","Phones & Tablets","Vehicles","Real Estate","Electronics","Jobs","Services","Fashion","Home & Living","Pets" ]; const locations = ["All Cambodia","Phnom Penh","Siem Reap","Battambang","Sihanoukville","Kampot","Bavet"]; const listings = useMemo(() => [ { id:1,title:"Samsung Galaxy S24 Ultra 256GB",price:"$1,099",img:"https://images.unsplash.com/photo-1592899677977-9c10ca588bbd?q=80&w=1200&auto=format&fit=crop",location:"Phnom Penh",time:"Today",category:"Phones & Tablets" }, { id:2,title:"Honda Dream 2019 — Good condition",price:"$1,150",img:"https://images.unsplash.com/photo-1519638831568-d9897f54ed0d?q=80&w=1200&auto=format&fit=crop",location:"Siem Reap",time:"1h ago",category:"Vehicles" }, { id:3,title:"Apartment for rent • BKK1 • 2BR",price:"$650/mo",img:"https://images.unsplash.com/photo-1501183638710-841dd1904471?q=80&w=1200&auto=format&fit=crop",location:"Phnom Penh",time:"Today",category:"Real Estate" }, { id:4,title:"PlayStation 5 + 2 controllers",price:"$450",img:"https://images.unsplash.com/photo-1585079542156-2755d9c8affd?q=80&w=1200&auto=format&fit=crop",location:"Battambang",time:"Yesterday",category:"Electronics" }, { id:5,title:"Accounting services (Monthly) — SME",price:"Contact",img:"https://images.unsplash.com/photo-1554224155-6726b3ff858f?q=80&w=1200&auto=format&fit=crop",location:"Phnom Penh",time:"2d ago",category:"Services" }, { id:6,title:"iPad Pro 11” (M2) + Pencil",price:"$850",img:"https://images.unsplash.com/photo-1557821552-17105176677c?q=80&w=1200&auto=format&fit=crop",location:"Kampot",time:"Today",category:"Phones & Tablets" }, { id:7,title:"Kawasaki H2 — 2018 • Original",price:"$17,500",img:"https://images.unsplash.com/photo-1519682577862-22b62b24e493?q=80&w=1200&auto=format&fit=crop",location:"Phnom Penh",time:"3h ago",category:"Vehicles" }, { id:8,title:"MacBook Pro 14” M3 • 1TB",price:"$1,899",img:"https://images.unsplash.com/photo-1517336714731-489689fd1ca8?q=80&w=1200&auto=format&fit=crop",location:"Bavet",time:"Today",category:"Electronics" }, ], []); const filtered = useMemo(() => listings.filter(x => { const q = query.trim().toLowerCase(); const matchesQuery = !q || x.title.toLowerCase().includes(q); const matchesCategory = category === "All Categories" || x.category === category; const matchesLocation = location === "All Cambodia" || x.location === location; return matchesQuery && matchesCategory && matchesLocation; }), [query, category, location, listings]); return (
GanDi Auditor — Cambodia's marketplace template
GanDi Auditor
{route === 'home' && (
setQuery(e.target.value)} placeholder="Search listings..." className="w-full mt-1 rounded-xl border px-3 py-2 focus:outline-none focus:ring-2 focus:ring-purple-500"/>
{categories.slice(1,8).map(c => ( ))}

Latest listings

See all
{filtered.map(item => )} {filtered.length===0 &&
No results. Try a different search.
}

Sell faster on GanDi Auditor

Post your items in minutes. Reach thousands of buyers across Cambodia.

)} {route === 'post' && setRoute('home')}/>} {route === 'profile' && } {showLogin && (
Log in

Use phone number or email

)}
); } function navCls(active){ return "px-2 py-1 rounded-lg " + (active ? "text-purple-600 font-semibold" : "hover:text-purple-600"); } function Card({item}){ return (
{item.title}
{item.location} • {item.time}
{item.title}
{item.price}
); } function PostAd({onBack}){ const [form,setForm] = React.useState({title:"",price:"",category:"Phones & Tablets",location:"Phnom Penh",description:""}); return (

Post a new ad

setForm({...form,title:e.target.value})} className="w-full rounded-xl border px-3 py-2" placeholder="e.g., iPhone 13 Pro Max 256GB"/>
setForm({...form,price:e.target.value})} className="w-full rounded-xl border px-3 py-2" placeholder="$..."/>