Hello Everyone Please i need help: I have 2 button...
# 💻developers
b
Hello Everyone Please i need help: I have 2 buttons to the carousel cards below. how can i handle click on each of the buttons please const products = [ { id: 1, Name: 'Product 1', Price: 10.99, ImageSrc: 'https://example.com/product1.jpg' }, { id: 2, Name: 'Product 2', Price: 19.99, ImageSrc: 'https://example.com/product2.jpg' } // Add more products as needed ] const carouselItems = products.map((product, index) => { const cardText =
${product.Name}\nThe price is ${product.Price}
return { type: 'card', title: { dynamicValue: cardText, valueType: 'dynamic' }, imageUrl: { dynamicValue:
${product.ImageSrc}
, valueType: 'dynamic' }, actions: [ { action: 'postback', label: 'Add to Carts', value:
open_product_${product.id}
}, { action: 'postback', label: 'View Cart', value:
open_product_${product.id}
} ], } })