Add type annotation for product fetching in CreateRecipePage component

This commit is contained in:
Nils-Johan Gynther
2026-04-09 23:06:21 +02:00
parent a2f30d6cfb
commit 3fd43b421a
@@ -18,7 +18,7 @@ export default function CreateRecipePage() {
const [error, setError] = useState<string | null>(null);
useEffect(() => {
fetchJson('/api/products')
fetchJson<Product[]>('/api/products')
.then(setProducts)
.catch(console.error);
}, []);