{product.name}
Price: ${product.price}
interface Product { id: number; name: string; price: number; } const products: Product[] = [ { id: 1, name: "Product 1", price: 50 }, { id: 2, name: "Product 2", price: 30 }, { id: 3, name: "Product 3", price: 20 }, ]; interface ProductProps { params: { id: string }; } export default function Product({ params }: ProductProps) { const product = products.find((p) => p.id === parseInt(params.id)); if (!product) return
Price: ${product.price}