feat(SW-1464): Added meeting url instead of hotel url for hotellisting with meeting information

Approved-by: Matilda Landström
This commit is contained in:
Erik Tiekstra
2025-03-18 07:01:56 +00:00
parent d5b47be2f2
commit da3a7c1865
11 changed files with 85 additions and 33 deletions

View File

@@ -18,20 +18,24 @@ import type { HotelListingItemProps } from "@/types/components/contentPage/hotel
export default async function HotelListingItem({
hotel,
additionalData,
contentType = "hotel",
url,
}: HotelListingItemProps) {
const intl = await getIntl()
const { description, imageSrc, altText } = getTypeSpecificInformation(
const { description, image, cta } = getTypeSpecificInformation(
intl,
contentType,
hotel
hotel.hotelContent,
additionalData,
url
)
return (
<article className={styles.container}>
<Image
src={imageSrc}
alt={altText}
src={image.src}
alt={image.alt}
width={300}
height={200}
className={styles.image}
@@ -62,7 +66,8 @@ export default async function HotelListingItem({
</div>
</div>
<Body>{description}</Body>
{url && (
{cta.url && (
<Button
intent="primary"
theme="base"
@@ -70,8 +75,12 @@ export default async function HotelListingItem({
className={styles.button}
asChild
>
<Link href={url} color="white">
{intl.formatMessage({ id: "See hotel details" })}
<Link
href={cta.url}
color="white"
target={cta.openInNewTab ? "_blank" : "_self"}
>
{cta.text}
</Link>
</Button>
)}