feat(SW-880): add wellness and exercise sidepeek
This commit is contained in:
committed by
Joakim Jäderberg
parent
d67affd677
commit
5206a40754
@@ -0,0 +1,71 @@
|
||||
import { wellnessAndExercise } from "@/constants/routes/hotelPageParams"
|
||||
|
||||
import Image from "@/components/Image"
|
||||
import Button from "@/components/TempDesignSystem/Button"
|
||||
import Link from "@/components/TempDesignSystem/Link"
|
||||
import SidePeek from "@/components/TempDesignSystem/SidePeek"
|
||||
import Body from "@/components/TempDesignSystem/Text/Body"
|
||||
import Subtitle from "@/components/TempDesignSystem/Text/Subtitle"
|
||||
import Title from "@/components/TempDesignSystem/Text/Title"
|
||||
import { getIntl } from "@/i18n"
|
||||
import { getLang } from "@/i18n/serverContext"
|
||||
|
||||
import styles from "./wellnessAndExercise.module.css"
|
||||
|
||||
import { WellnessAndExerciseSidePeekProps } from "@/types/components/hotelPage/sidepeek/wellnessAndExercise"
|
||||
|
||||
export default async function WellnessAndExerciseSidePeek({
|
||||
healthFacilities,
|
||||
}: WellnessAndExerciseSidePeekProps) {
|
||||
const intl = await getIntl()
|
||||
const lang = getLang()
|
||||
|
||||
return (
|
||||
<SidePeek
|
||||
contentKey={wellnessAndExercise[lang]}
|
||||
title={intl.formatMessage({ id: "Wellness & Exercise" })}
|
||||
>
|
||||
<div className={styles.wrapper}>
|
||||
{healthFacilities.map((facility) => (
|
||||
<div className={styles.content} key={facility.type}>
|
||||
<Image
|
||||
src={facility.content.images[0]?.imageSizes.large}
|
||||
alt={facility.content.images[0]?.metaData.altText}
|
||||
className={styles.image}
|
||||
height={400}
|
||||
width={200}
|
||||
/>
|
||||
<div className={styles.information}>
|
||||
<Subtitle color="burgundy" asChild>
|
||||
<Title level="h3">{facility.type}</Title>
|
||||
</Subtitle>
|
||||
<div>
|
||||
<Subtitle>
|
||||
{intl.formatMessage({ id: " Opening Hours" })}
|
||||
</Subtitle>
|
||||
<Body className={styles.body}>
|
||||
{facility.openingDetails.openingHours.ordinary.alwaysOpen
|
||||
? `${intl.formatMessage({ id: "Mon-Fri" })} ${intl.formatMessage({ id: "Always open" })}`
|
||||
: `${intl.formatMessage({ id: "Mon-Fri" })} ${facility.openingDetails.openingHours.ordinary.openingTime}-${facility.openingDetails.openingHours.ordinary.closingTime}`}
|
||||
</Body>
|
||||
<Body>
|
||||
{facility.openingDetails.openingHours.weekends.alwaysOpen
|
||||
? `${intl.formatMessage({ id: "Sat-Sun" })} ${intl.formatMessage({ id: "Always open" })}`
|
||||
: `${intl.formatMessage({ id: "Sat-Sun" })} ${facility.openingDetails.openingHours.weekends.openingTime}-${facility.openingDetails.openingHours.weekends.closingTime}`}
|
||||
</Body>
|
||||
<Body>Placeholder text</Body>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
<div className={styles.buttonContainer}>
|
||||
<Button fullWidth theme="base" intent="secondary" asChild>
|
||||
<Link href="#" weight="bold" color="burgundy">
|
||||
{intl.formatMessage({ id: "Show wellness & exercise" })}
|
||||
</Link>
|
||||
</Button>
|
||||
</div>
|
||||
</SidePeek>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
.wrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--Spacing-x4);
|
||||
margin-bottom: calc(
|
||||
var(--Spacing-x4) * 2 + 80px
|
||||
); /* Creates space between the wrapper and buttonContainer */
|
||||
}
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--Spacing-x2);
|
||||
}
|
||||
|
||||
.image {
|
||||
width: 100%;
|
||||
height: 270px;
|
||||
object-fit: cover;
|
||||
border-radius: var(--Corner-radius-Medium);
|
||||
}
|
||||
|
||||
.information {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--Spacing-x-one-and-half);
|
||||
}
|
||||
|
||||
.body {
|
||||
margin-top: var(--Spacing-x1);
|
||||
}
|
||||
|
||||
.buttonContainer {
|
||||
background-color: var(--Base-Background-Primary-Normal);
|
||||
border-top: 1px solid var(--Base-Border-Subtle);
|
||||
padding: var(--Spacing-x4) var(--Spacing-x2);
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
@@ -16,6 +16,7 @@ import MapCard from "./Map/MapCard"
|
||||
import MapWithCardWrapper from "./Map/MapWithCard"
|
||||
import MobileMapToggle from "./Map/MobileMapToggle"
|
||||
import StaticMap from "./Map/StaticMap"
|
||||
import WellnessAndExerciseSidePeek from "./SidePeeks/WellnessAndExercise"
|
||||
import AmenitiesList from "./AmenitiesList"
|
||||
import Facilities from "./Facilities"
|
||||
import IntroSection from "./IntroSection"
|
||||
@@ -52,6 +53,7 @@ export default async function HotelPage() {
|
||||
facilities,
|
||||
faq,
|
||||
alerts,
|
||||
healthFacilities,
|
||||
} = hotelData
|
||||
|
||||
const topThreePois = pointsOfInterest.slice(0, 3)
|
||||
@@ -145,13 +147,7 @@ export default async function HotelPage() {
|
||||
{/* TODO */}
|
||||
Restaurant & Bar
|
||||
</SidePeek>
|
||||
<SidePeek
|
||||
contentKey={hotelPageParams.wellnessAndExercise[lang]}
|
||||
title={intl.formatMessage({ id: "Wellness & Exercise" })}
|
||||
>
|
||||
{/* TODO */}
|
||||
Wellness & Exercise
|
||||
</SidePeek>
|
||||
<WellnessAndExerciseSidePeek healthFacilities={healthFacilities} />
|
||||
<SidePeek
|
||||
contentKey={hotelPageParams.activities[lang]}
|
||||
title={intl.formatMessage({ id: "Activities" })}
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
"All our breakfast buffets offer gluten free, vegan, and allergy-friendly options.": "Alle vores morgenmadsbuffeter tilbyder glutenfrie, veganske og allergivenlige muligheder.",
|
||||
"Allergy Room": "Allergirum",
|
||||
"Already a friend?": "Allerede en ven?",
|
||||
"Always open": "Altid åben",
|
||||
"Amenities": "Faciliteter",
|
||||
"Amusement park": "Forlystelsespark",
|
||||
"An error occurred trying to manage your preferences, please try again later.": "Der opstod en fejl under forsøget på at administrere dine præferencer. Prøv venligst igen senere.",
|
||||
@@ -198,6 +199,7 @@
|
||||
"Membership terms and conditions": "Medlemsvilkår og -betingelser",
|
||||
"Menu": "Menu",
|
||||
"Modify": "Ændre",
|
||||
"Mon-Fri": "Man-Fre",
|
||||
"Month": "Måned",
|
||||
"Museum": "Museum",
|
||||
"My communication preferences": "Mine kommunikationspræferencer",
|
||||
@@ -235,6 +237,7 @@
|
||||
"Open language menu": "Åbn sprogmenuen",
|
||||
"Open menu": "Åbn menuen",
|
||||
"Open my pages menu": "Åbn mine sider menuen",
|
||||
"Opening Hours": "Åbningstider",
|
||||
"Overview": "Oversigt",
|
||||
"PETR": "Kæledyr",
|
||||
"Parking": "Parkering",
|
||||
@@ -286,6 +289,7 @@
|
||||
"Room types available": "{numberOfRooms, plural, one {# room type} other {# room types}} tilgængelig",
|
||||
"Rooms": "Værelser",
|
||||
"Rooms & Guests": "Værelser & gæster",
|
||||
"Sat-Sun": "Lør-Søn",
|
||||
"Sauna and gym": "Sauna and gym",
|
||||
"Save": "Gemme",
|
||||
"Scandic Friends Mastercard": "Scandic Friends Mastercard",
|
||||
@@ -317,6 +321,7 @@
|
||||
"Show less rooms": "Vise færre rum",
|
||||
"Show more": "Vis mere",
|
||||
"Show more rooms": "Vise flere rum",
|
||||
"Show wellness & exercise": "Vis velvære og motion",
|
||||
"Sign up bonus": "Velkomstbonus",
|
||||
"Sign up to Scandic Friends": "Tilmeld dig Scandic Friends",
|
||||
"Skip to main content": "Spring over og gå til hovedindhold",
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
"All our breakfast buffets offer gluten free, vegan, and allergy-friendly options.": "Alle unsere Frühstücksbuffets bieten glutenfreie, vegane und allergikerfreundliche Speisen.",
|
||||
"Allergy Room": "Allergikerzimmer",
|
||||
"Already a friend?": "Sind wir schon Freunde?",
|
||||
"Always open": "Immer geöffnet",
|
||||
"Amenities": "Annehmlichkeiten",
|
||||
"Amusement park": "Vergnügungspark",
|
||||
"An error occurred trying to manage your preferences, please try again later.": "Beim Versuch, Ihre Einstellungen zu verwalten, ist ein Fehler aufgetreten. Bitte versuchen Sie es später erneut.",
|
||||
@@ -196,6 +197,7 @@
|
||||
"Membership ID copied to clipboard": "Mitglieds-ID in die Zwischenablage kopiert",
|
||||
"Membership cards": "Mitgliedskarten",
|
||||
"Modify": "Ändern",
|
||||
"Mon-Fri": "Mo-Fr",
|
||||
"Month": "Monat",
|
||||
"Museum": "Museum",
|
||||
"My communication preferences": "Meine Kommunikationseinstellungen",
|
||||
@@ -233,6 +235,7 @@
|
||||
"Open language menu": "Sprachmenü öffnen",
|
||||
"Open menu": "Menü öffnen",
|
||||
"Open my pages menu": "Meine Seiten Menü öffnen",
|
||||
"Opening Hours": "Öffnungszeiten",
|
||||
"Overview": "Übersicht",
|
||||
"PETR": "Haustier",
|
||||
"Parking": "Parken",
|
||||
@@ -285,6 +288,7 @@
|
||||
"Room types available": "{numberOfRooms, plural, one {# room type} other {# room types}} verfügbar",
|
||||
"Rooms": "Räume",
|
||||
"Rooms & Guests": "Zimmer & Gäste",
|
||||
"Sat-Sun": "Sa-So",
|
||||
"Sauna and gym": "Sauna and gym",
|
||||
"Save": "Speichern",
|
||||
"Scandic Friends Mastercard": "Scandic Friends Mastercard",
|
||||
@@ -316,6 +320,7 @@
|
||||
"Show less rooms": "Weniger Zimmer anzeigen",
|
||||
"Show more": "Mehr anzeigen",
|
||||
"Show more rooms": "Weitere Räume anzeigen",
|
||||
"Show wellness & exercise": "Zeige Wellness und Bewegung",
|
||||
"Sign up bonus": "Anmelde-Bonus",
|
||||
"Sign up to Scandic Friends": "Treten Sie Scandic Friends bei",
|
||||
"Skip to main content": "Direkt zum Inhalt",
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
"All our breakfast buffets offer gluten free, vegan, and allergy-friendly options.": "All our breakfast buffets offer gluten free, vegan, and allergy-friendly options.",
|
||||
"Allergy Room": "Allergy room",
|
||||
"Already a friend?": "Already a friend?",
|
||||
"Always open": "Always open",
|
||||
"Amenities": "Amenities",
|
||||
"Amusement park": "Amusement park",
|
||||
"An error occurred trying to manage your preferences, please try again later.": "An error occurred trying to manage your preferences, please try again later.",
|
||||
@@ -215,6 +216,7 @@
|
||||
"Membership terms and conditions": "Membership terms and conditions",
|
||||
"Menu": "Menu",
|
||||
"Modify": "Modify",
|
||||
"Mon-Fri": "Mon-Fri",
|
||||
"Month": "Month",
|
||||
"Museum": "Museum",
|
||||
"My communication preferences": "My communication preferences",
|
||||
@@ -252,6 +254,7 @@
|
||||
"Open language menu": "Open language menu",
|
||||
"Open menu": "Open menu",
|
||||
"Open my pages menu": "Open my pages menu",
|
||||
"Opening Hours": "Opening Hours",
|
||||
"Overview": "Overview",
|
||||
"PETR": "Pet",
|
||||
"Parking": "Parking",
|
||||
@@ -313,6 +316,7 @@
|
||||
"Room types available": "{numberOfRooms, plural, one {# room type} other {# room types}} available",
|
||||
"Rooms": "Rooms",
|
||||
"Rooms & Guests": "Rooms & Guests",
|
||||
"Sat-Sun": "Sat-Sun",
|
||||
"Sauna and gym": "Sauna and gym",
|
||||
"Save": "Save",
|
||||
"Save card to profile": "Save card to profile",
|
||||
@@ -346,6 +350,7 @@
|
||||
"Show less rooms": "Show less rooms",
|
||||
"Show more": "Show more",
|
||||
"Show more rooms": "Show more rooms",
|
||||
"Show wellness & exercise": "Show wellness & exercise",
|
||||
"Sign up bonus": "Sign up bonus",
|
||||
"Sign up to Scandic Friends": "Sign up to Scandic Friends",
|
||||
"Skip to main content": "Skip to main content",
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
"All our breakfast buffets offer gluten free, vegan, and allergy-friendly options.": "Kaikki aamiaisbuffettimme tarjoavat gluteenittomia, vegaanisia ja allergiaystävällisiä vaihtoehtoja.",
|
||||
"Allergy Room": "Allergiahuone",
|
||||
"Already a friend?": "Oletko jo ystävä?",
|
||||
"Always open": "Aina auki",
|
||||
"Amenities": "Mukavuudet",
|
||||
"Amusement park": "Huvipuisto",
|
||||
"An error occurred trying to manage your preferences, please try again later.": "Asetusten hallinnassa tapahtui virhe. Yritä myöhemmin uudelleen.",
|
||||
@@ -198,6 +199,7 @@
|
||||
"Membership terms and conditions": "Jäsenehdot ja -säännöt",
|
||||
"Menu": "Valikko",
|
||||
"Modify": "Muokkaa",
|
||||
"Mon-Fri": "Ma-Pe",
|
||||
"Month": "Kuukausi",
|
||||
"Museum": "Museo",
|
||||
"My communication preferences": "Viestintämieltymykseni",
|
||||
@@ -235,6 +237,7 @@
|
||||
"Open language menu": "Avaa kielivalikko",
|
||||
"Open menu": "Avaa valikko",
|
||||
"Open my pages menu": "Avaa omat sivut -valikko",
|
||||
"Opening Hours": "Aukioloajat",
|
||||
"Overview": "Yleiskatsaus",
|
||||
"PETR": "Lemmikki",
|
||||
"Parking": "Pysäköinti",
|
||||
@@ -287,6 +290,7 @@
|
||||
"Rooms": "Huoneet",
|
||||
"Rooms & Guests": "Huoneet & Vieraat",
|
||||
"Rooms & Guestss": "Huoneet & Vieraat",
|
||||
"Sat-Sun": "La-Su",
|
||||
"Sauna and gym": "Sauna and gym",
|
||||
"Save": "Tallenna",
|
||||
"Scandic Friends Mastercard": "Scandic Friends Mastercard",
|
||||
@@ -318,6 +322,7 @@
|
||||
"Show less rooms": "Näytä vähemmän huoneita",
|
||||
"Show more": "Näytä lisää",
|
||||
"Show more rooms": "Näytä lisää huoneita",
|
||||
"Show wellness & exercise": "Näytä hyvinvointi ja liikunta",
|
||||
"Sign up bonus": "Liittymisbonus",
|
||||
"Sign up to Scandic Friends": "Liity Scandic Friends -jäseneksi",
|
||||
"Skip to main content": "Siirry pääsisältöön",
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
"All our breakfast buffets offer gluten free, vegan, and allergy-friendly options.": "Alle våre frokostbufféer tilbyr glutenfrie, veganske og allergivennlige alternativer.",
|
||||
"Allergy Room": "Allergirom",
|
||||
"Already a friend?": "Allerede Friend?",
|
||||
"Always open": "Alltid åpen",
|
||||
"Amenities": "Fasiliteter",
|
||||
"Amusement park": "Tivoli",
|
||||
"An error occurred trying to manage your preferences, please try again later.": "Det oppstod en feil under forsøket på å administrere innstillingene dine. Prøv igjen senere.",
|
||||
@@ -196,6 +197,7 @@
|
||||
"Membership terms and conditions": "Medlemsvilkår og -betingelser",
|
||||
"Menu": "Menu",
|
||||
"Modify": "Endre",
|
||||
"Mon-Fri": "Man-Fre",
|
||||
"Month": "Måned",
|
||||
"Museum": "Museum",
|
||||
"My communication preferences": "Mine kommunikasjonspreferanser",
|
||||
@@ -233,6 +235,7 @@
|
||||
"Open language menu": "Åpne språkmenyen",
|
||||
"Open menu": "Åpne menyen",
|
||||
"Open my pages menu": "Åpne mine sider menyen",
|
||||
"Opening Hours": "Åpningstider",
|
||||
"Overview": "Oversikt",
|
||||
"PETR": "Kjæledyr",
|
||||
"Parking": "Parkering",
|
||||
@@ -284,6 +287,7 @@
|
||||
"Room types available": "{numberOfRooms, plural, one {# room type} other {# room types}} tilgjengelig",
|
||||
"Rooms": "Rom",
|
||||
"Rooms & Guests": "Rom og gjester",
|
||||
"Sat-Sun": "Lør-Søn",
|
||||
"Sauna and gym": "Sauna and gym",
|
||||
"Save": "Lagre",
|
||||
"Scandic Friends Mastercard": "Scandic Friends Mastercard",
|
||||
@@ -315,6 +319,7 @@
|
||||
"Show less rooms": "Vise færre rom",
|
||||
"Show more": "Vis mer",
|
||||
"Show more rooms": "Vise flere rom",
|
||||
"Show wellness & exercise": "Vis velvære og trening",
|
||||
"Sign up bonus": "Velkomstbonus",
|
||||
"Sign up to Scandic Friends": "Bli med i Scandic Friends",
|
||||
"Skip to main content": "Gå videre til hovedsiden",
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
"All our breakfast buffets offer gluten free, vegan, and allergy-friendly options.": "Alla våra frukostbufféer erbjuder glutenfria, veganska och allergivänliga alternativ.",
|
||||
"Allergy Room": "Allergirum",
|
||||
"Already a friend?": "Är du redan en vän?",
|
||||
"Always open": "Alltid öppet",
|
||||
"Amenities": "Bekvämligheter",
|
||||
"Amusement park": "Nöjespark",
|
||||
"An error occurred trying to manage your preferences, please try again later.": "Ett fel uppstod när du försökte hantera dina inställningar, försök igen senare.",
|
||||
@@ -196,6 +197,7 @@
|
||||
"Membership terms and conditions": "Medlemsvillkor",
|
||||
"Menu": "Meny",
|
||||
"Modify": "Ändra",
|
||||
"Mon-Fri": "Mån-Fre",
|
||||
"Month": "Månad",
|
||||
"Museum": "Museum",
|
||||
"My communication preferences": "Mina kommunikationspreferenser",
|
||||
@@ -233,6 +235,7 @@
|
||||
"Open language menu": "Öppna språkmenyn",
|
||||
"Open menu": "Öppna menyn",
|
||||
"Open my pages menu": "Öppna mina sidor menyn",
|
||||
"Opening Hours": "Öppettider",
|
||||
"Overview": "Översikt",
|
||||
"PETR": "Husdjur",
|
||||
"Parking": "Parkering",
|
||||
@@ -284,6 +287,7 @@
|
||||
"Room types available": "{numberOfRooms, plural, one {# room type} other {# room types}} tillgängliga",
|
||||
"Rooms": "Rum",
|
||||
"Rooms & Guests": "Rum och gäster",
|
||||
"Sat-Sun": "Lör-Sön",
|
||||
"Sauna and gym": "Sauna and gym",
|
||||
"Save": "Spara",
|
||||
"Scandic Friends Mastercard": "Scandic Friends Mastercard",
|
||||
@@ -315,6 +319,7 @@
|
||||
"Show less rooms": "Visa färre rum",
|
||||
"Show more": "Visa mer",
|
||||
"Show more rooms": "Visa fler rum",
|
||||
"Show wellness & exercise": "Visa välbefinnande och träning",
|
||||
"Sign up bonus": "Välkomstbonus",
|
||||
"Sign up to Scandic Friends": "Bli medlem i Scandic Friends",
|
||||
"Skip to main content": "Fortsätt till huvudinnehåll",
|
||||
|
||||
@@ -354,6 +354,7 @@ export const hotelQueryRouter = router({
|
||||
facilities,
|
||||
alerts: hotelAlerts,
|
||||
faq: contentstackData?.faq,
|
||||
healthFacilities: hotelAttributes.healthFacilities,
|
||||
}
|
||||
}),
|
||||
availability: router({
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
import { Hotel } from "@/types/hotel"
|
||||
|
||||
export type WellnessAndExerciseSidePeekProps = {
|
||||
healthFacilities: Hotel["healthFacilities"]
|
||||
}
|
||||
Reference in New Issue
Block a user