Hey all. Can't get a button to open a link in a new tab.
carousel = {
layout: 'Carousel',
cards: []
};
const carouselItems = apiResponse.records;
const carouselCard = (Size, Climate_Control, Price, Available_Date, Booking, Image) => ({
title:
${Size},description: {
text:
Climate control: ${Climate_Control} Price: ${Price}},
imageUrl: Image,
buttons: [
{
name: 'Book Unit',
request: {
type: 'open_url',
payload: {
actions: [{ type: 'open_url', payload: { url: Booking } }]
}
}
}
]
});
carouselItems.forEach(item => {
const fields = item.fields;
carousel.cards.push(carouselCard(
fields.Size,
fields.Climate_Control,
fields.Price,
fields.Available_Date,
fields.Booking,
fields.Image
));
});
carousel = JSON.stringify(carousel);

