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