+
+
Search Recipes
+
+ {/* Search input */}
+
+
+ {/* Filter bar */}
+
+
+
+
+ handleMaxMinsChange(e.target.value)}
+ className="w-36"
+ />
+
+
+ {hasQuery && !loading && (
+
+ {total} {total === 1 ? "recipe" : "recipes"} found
+
+ )}
+
+
+
+ {/* States */}
+ {!hasQuery && (
+
+
+
Search for recipes...
+
Try "pasta", "vegan dessert", or "quick dinner"
+
+ )}
+
+ {hasQuery && loading && (
+
+ {Array.from({ length: 8 }).map((_, i) => (
+
+ ))}
+
+ )}
+
+ {hasQuery && !loading && results.length === 0 && (
+
+
+
No recipes found for “{query}”
+
Try different keywords or remove filters
+
+ )}
+
+ {!loading && results.length > 0 && (
+ <>
+
+ {results.map((recipe) => (
+
+ ))}
+
+
+ {hasMore && (
+
+
+
+ )}
+ >
+ )}
+
+ );
+}