export interface Product { id: string; name: string; price: string; imageSrc: string; imageAlt?: string; description?: string; } export async function fetchProducts(): Promise { try { const response = await fetch('/api/products'); if (!response.ok) { throw new Error('Failed to fetch products'); } return response.json(); } catch (error) { console.error('Error fetching products:', error); return []; } }