import Navbar from "./components/Navbar"; import ProductCard from "./components/ProductCards"; import Dropdown from "./components/dropdown/index"; import { filterOperations } from "./components/filterOperations"; const App = () => { const { filteredProducts, loading, error, filters, handleFilterChange } = filterOperations(); if (loading) { return
Loading...
; } if (error) { return
Error: {error?.message}
; } const categoryOptions = [ { value: "all", label: "All Categories" }, { value: "men's clothing", label: "Men's Clothing" }, { value: "women's clothing", label: "Women's Clothing" }, { value: "jewelery", label: "Jewelery" }, { value: "electronics", label: "Electronics" }, ]; const priceOptions = [ { value: "all", label: "All Prices" }, { value: "low", label: "Below $50" }, { value: "mid", label: "$50 - $100" }, { value: "high", label: "Above $100" }, ]; const ratingOptions = [ { value: "all", label: "All Ratings" }, { value: "4", label: "4 & Up" }, { value: "3", label: "3 & Up" }, { value: "2", label: "2 & Up" }, ]; return (
{filteredProducts?.map((product) => ( ))}
); }; export default App;