fix(SW-302): fixes after rebase
This commit is contained in:
@@ -1,35 +0,0 @@
|
||||
import type { Facility } from "@/types/components/hotelPage/facilities"
|
||||
import type { ActivityCard } from "@/types/trpc/routers/contentstack/hotelPage"
|
||||
|
||||
export function setActivityCard(activitiesCard: ActivityCard): Facility {
|
||||
const hasImage = !!activitiesCard.background_image
|
||||
return [
|
||||
{
|
||||
id: "activities",
|
||||
theme: hasImage ? "image" : "primaryDark",
|
||||
scriptedTopTitle: activitiesCard.scripted_title,
|
||||
heading: activitiesCard.heading,
|
||||
bodyText: activitiesCard.body_text,
|
||||
backgroundImage: hasImage ? activitiesCard.background_image : undefined,
|
||||
primaryButton: hasImage
|
||||
? {
|
||||
href: activitiesCard.contentPage.href,
|
||||
title: activitiesCard.cta_text,
|
||||
isExternal: false,
|
||||
}
|
||||
: undefined,
|
||||
secondaryButton: hasImage
|
||||
? undefined
|
||||
: {
|
||||
href: activitiesCard.contentPage.href,
|
||||
title: activitiesCard.cta_text,
|
||||
isExternal: false,
|
||||
},
|
||||
columnSpan: "three",
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
export function getCardTheme() {
|
||||
// TODO
|
||||
}
|
||||
@@ -55,7 +55,7 @@ export default async function HotelPage() {
|
||||
facilityCards,
|
||||
hotelDetailedFacilities
|
||||
)
|
||||
activitiesCard && facilities.push(setActivityCard(activitiesCard))
|
||||
//activitiesCard && facilities.push(setActivityCard(activitiesCard))
|
||||
const topThreePois = pointsOfInterest.slice(0, 3)
|
||||
|
||||
const coordinates = {
|
||||
|
||||
@@ -11,6 +11,7 @@ import { cardVariants } from "./variants"
|
||||
|
||||
import styles from "./card.module.css"
|
||||
|
||||
import type { ImageVaultAsset } from "@/types/components/imageVault"
|
||||
import type { CardProps } from "./card"
|
||||
|
||||
export default function Card({
|
||||
@@ -30,12 +31,13 @@ export default function Card({
|
||||
const buttonTheme = getTheme(theme)
|
||||
|
||||
imageHeight = imageHeight || 320
|
||||
imageWidth =
|
||||
|
||||
/*imageWidth =
|
||||
imageWidth ||
|
||||
(backgroundImage
|
||||
? backgroundImage.dimensions.aspectRatio * imageHeight
|
||||
: 420)
|
||||
|
||||
*/
|
||||
return (
|
||||
<article
|
||||
className={cardVariants({
|
||||
@@ -49,7 +51,7 @@ export default function Card({
|
||||
src={backgroundImage.url}
|
||||
className={styles.image}
|
||||
alt={backgroundImage.meta.alt || backgroundImage.title}
|
||||
width={imageWidth}
|
||||
width={420}
|
||||
height={imageHeight}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -84,7 +84,6 @@
|
||||
"FAQ": "Ofte stillede spørgsmål",
|
||||
"Failed to delete credit card, please try again later.": "Kunne ikke slette kreditkort. Prøv venligst igen senere.",
|
||||
"Fair": "Messe",
|
||||
"FAQ": "FAQ",
|
||||
"Find booking": "Find booking",
|
||||
"Find hotels": "Find hotel",
|
||||
"Flexibility": "Fleksibilitet",
|
||||
|
||||
@@ -84,7 +84,6 @@
|
||||
"FAQ": "UKK",
|
||||
"Failed to delete credit card, please try again later.": "Luottokortin poistaminen epäonnistui, yritä myöhemmin uudelleen.",
|
||||
"Fair": "Messukeskus",
|
||||
"FAQ": "FAQ",
|
||||
"Find booking": "Etsi varaus",
|
||||
"Find hotels": "Etsi hotelleja",
|
||||
"Flexibility": "Joustavuus",
|
||||
|
||||
@@ -80,7 +80,6 @@
|
||||
"Explore all levels and benefits": "Utforsk alle nivåer og fordeler",
|
||||
"Explore nearby": "Utforsk i nærheten",
|
||||
"Extras to your booking": "Tilvalg til bestillingen din",
|
||||
"FAQ": "FAQ",
|
||||
"Failed to delete credit card, please try again later.": "Kunne ikke slette kredittkortet, prøv igjen senere.",
|
||||
"Fair": "Messe",
|
||||
"FAQ": "FAQ",
|
||||
|
||||
@@ -84,7 +84,6 @@
|
||||
"FAQ": "FAQ",
|
||||
"Failed to delete credit card, please try again later.": "Det gick inte att ta bort kreditkortet, försök igen senare.",
|
||||
"Fair": "Mässa",
|
||||
"FAQ": "FAQ",
|
||||
"Find booking": "Hitta bokning",
|
||||
"Find hotels": "Hitta hotell",
|
||||
"Flexibility": "Flexibilitet",
|
||||
|
||||
@@ -245,7 +245,7 @@ export const hotelQueryRouter = router({
|
||||
hotelImages: images,
|
||||
pointsOfInterest: hotelAttributes.pointsOfInterest,
|
||||
roomCategories,
|
||||
activitiesCard: activities,
|
||||
activitiesCard: activities?.upcoming_activities_card,
|
||||
facilityCards: facilities,
|
||||
}
|
||||
}),
|
||||
|
||||
@@ -74,7 +74,10 @@ async function setCardProps(
|
||||
return card
|
||||
}
|
||||
|
||||
export function setFacilityCards(facilities: Facility[], amenities: Amenities) {
|
||||
export async function setFacilityCards(
|
||||
facilities: Facility[],
|
||||
amenities: Amenities
|
||||
) {
|
||||
const lang = getLang()
|
||||
const cards: Facilities = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user