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:
@@ -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>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user