Review

Live-filter products as the user types

Adds a polling refresh so the product list stays in sync while the user types a filter query.

ReactTier 3frontendbugs

Click a line to flag it, pick one or more labels, then submit. If the change looks correct, approve it.

components/ProductList.tsx+6-0
2222 const [query, setQuery] = useState("");
2323 const [results, setResults] = useState<Product[]>([]);
2424
25+ useEffect(() => {
26+ const id = setInterval(() => {
27+ setResults(filterProducts(products, query));
28+ }, 1000);
29+ return () => clearInterval(id);
30+ }, []);