image


import { useState } from 'react'; import { Search, Star } from 'lucide-react'; import { ItemCard } from '@/components/ItemCard'; import { CategoryFilter } from '@/components/CategoryFilter'; import { Header } from '@/components/Header'; const sampleItems = [ { id: 1, name: "Vintage Leather Armchair", price: 75, image: "https://images.unsplash.com/photo-1586023492125-27b2c045efd7?w=400&h=300&fit=crop", category: "Furniture", condition: "Good", description: "Comfortable leather armchair with some wear but still very sturdy. Perfect for a reading nook!" }, { id: 2, name: "Classic Vinyl Records Collection", price: 45, image: "https://images.unsplash.com/photo-1493225457124-a3eb161ffa5f?w=400&h=300&fit=crop", category: "Music", condition: "Excellent", description: "Collection of 20 classic rock and jazz vinyl records from the 70s and 80s." }, { id: 3, name: "Antique Wooden Jewelry Box", price: 25, image: "https://images.unsplash.com/photo-1515562141207-7a88fb7ce338?w=400&h=300&fit=crop", category: "Accessories", condition: "Very Good", description: "Beautiful handcrafted jewelry box with mirror and multiple compartments." }, { id: 4, name: "Kitchen Stand Mixer", price: 120, image: "https://images.unsplash.com/photo-1578662996442-48f60103fc96?w=400&h=300&fit=crop", category: "Appliances", condition: "Like New", description: "Barely used stand mixer, perfect for baking enthusiasts. Includes all attachments." }, { id: 5, name: "Hardcover Book Collection", price: 15, image: "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=400&h=300&fit=crop", category: "Books", condition: "Good", description: "Set of 12 classic literature hardcover books. Some shelf wear but pages are pristine." }, { id: 6, name: "Ceramic Plant Pots Set", price: 30, image: "https://images.unsplash.com/photo-1485955900006-10f4d324d411?w=400&h=300&fit=crop", category: "Garden", condition: "Excellent", description: "Set of 4 beautiful ceramic plant pots in different sizes. Perfect for indoor plants." } ]; const categories = ["All", "Furniture", "Music", "Accessories", "Appliances", "Books", "Garden"]; const Index = () => { const [selectedCategory, setSelectedCategory] = useState("All"); const [searchTerm, setSearchTerm] = useState(""); const filteredItems = sampleItems.filter(item => { const matchesCategory = selectedCategory === "All" || item.category === selectedCategory; const matchesSearch = item.name.toLowerCase().includes(searchTerm.toLowerCase()) || item.description.toLowerCase().includes(searchTerm.toLowerCase()); return matchesCategory && matchesSearch; }); return (
{/* Hero Section */}

Welcome to My Virtual Garage Sale! 🏠

Find unique treasures and pre-loved items at great prices. Everything must go!

Quality Items
{/* Search Bar */}
setSearchTerm(e.target.value)} className="w-full pl-10 pr-4 py-3 rounded-full border-2 border-amber-200 focus:border-amber-400 focus:outline-none bg-white shadow-lg" />
{/* Category Filter */} {/* Items Grid */}
{filteredItems.map(item => ( ))}
{filteredItems.length === 0 && (

No items found matching your search.

Try a different category or search term!

)}
{/* Footer */}
); }; export default Index;