feat(SW-240): add translations
This commit is contained in:
@@ -1,21 +1,35 @@
|
||||
.container {
|
||||
display: none;
|
||||
border-top: 1px solid var(--Base-Border-Subtle);
|
||||
/* display: none; */
|
||||
}
|
||||
|
||||
.form {
|
||||
display: flex;
|
||||
padding: var(--Spacing-x2) var(--Spacing-x5);
|
||||
}
|
||||
|
||||
.input {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
max-width: 1250px;
|
||||
}
|
||||
|
||||
.where {
|
||||
width: 100%;
|
||||
max-width: 280px;
|
||||
}
|
||||
|
||||
.when {
|
||||
width: 100%;
|
||||
max-width: 240px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the styles after mobile UX is ready
|
||||
*/
|
||||
|
||||
@media screen and (min-width: 1367px) {
|
||||
@media screen and (max-width: 1367px) {
|
||||
.container {
|
||||
display: grid;
|
||||
padding: 0 var(--Spacing-x5);
|
||||
gap: var(--Spacing-x3);
|
||||
}
|
||||
.form {
|
||||
display: grid;
|
||||
gap: var(--Spacing-x5);
|
||||
grid-template-columns: repeat(6, auto);
|
||||
align-items: center;
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
"use client"
|
||||
import { zodResolver } from "@hookform/resolvers/zod"
|
||||
import { FormProvider, useForm } from "react-hook-form"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { dt } from "@/lib/dt"
|
||||
|
||||
@@ -12,6 +13,8 @@ import styles from "./bookingWidget.module.css"
|
||||
import { type BookingWidgetSchema } from "@/types/components/bookingWidget"
|
||||
|
||||
export function BookingWidget() {
|
||||
const { formatMessage } = useIntl()
|
||||
|
||||
const methods = useForm<BookingWidgetSchema>({
|
||||
defaultValues: {
|
||||
search: {
|
||||
@@ -49,11 +52,18 @@ export function BookingWidget() {
|
||||
<div id="booking-widget" className={styles.container}>
|
||||
<form onSubmit={methods.handleSubmit(onSubmit)} className={styles.form}>
|
||||
<FormProvider {...methods}>
|
||||
<div>Search</div>
|
||||
<div>Nights</div>
|
||||
<div>Rooms</div>
|
||||
<div>Bonus code</div>
|
||||
<div>Bonus cheque or reward nights</div>
|
||||
<div className={styles.input}>
|
||||
<div className={styles.where}>
|
||||
{formatMessage({ id: "Where to" })}
|
||||
</div>
|
||||
<div className={styles.when}>{formatMessage({ id: "When" })}</div>
|
||||
<div className={styles.rooms}>
|
||||
{formatMessage({ id: "Rooms & Guests" })}
|
||||
</div>
|
||||
<div className={styles.vouchers}>
|
||||
{formatMessage({ id: "Booking codes and vouchers" })}
|
||||
</div>
|
||||
</div>
|
||||
<Button type="submit">Search</Button>
|
||||
</FormProvider>
|
||||
</form>
|
||||
|
||||
@@ -28,7 +28,7 @@ export default async function Header({
|
||||
/**
|
||||
* ToDo: Create logic to get this info from ContentStack based on page
|
||||
* */
|
||||
const hideBookingWidget = true
|
||||
const hideBookingWidget = false
|
||||
|
||||
if (!data) {
|
||||
return null
|
||||
|
||||
@@ -134,5 +134,9 @@
|
||||
"Room facilities": "Værelsesfaciliteter",
|
||||
"Hotel facilities": "Hotel faciliteter",
|
||||
"Hotel surroundings": "Hotel omgivelser",
|
||||
"Show map": "Vis kort"
|
||||
"Show map": "Vis kort",
|
||||
"Where to": "Hvorhen",
|
||||
"When": "Hvornår",
|
||||
"Rooms & Guests": "Værelser & gæster",
|
||||
"Booking codes and vouchers": "Bestillingskoder og værdibeviser"
|
||||
}
|
||||
|
||||
@@ -128,5 +128,9 @@
|
||||
"Room facilities": "Zimmerausstattung",
|
||||
"Hotel facilities": "Hotel-Infos",
|
||||
"Hotel surroundings": "Umgebung des Hotels",
|
||||
"Show map": "Karte anzeigen"
|
||||
"Show map": "Karte anzeigen",
|
||||
"Where to": "Wohin",
|
||||
"When": "Wann",
|
||||
"Rooms & Guests": "Zimmer & Gäste",
|
||||
"Booking codes and vouchers": "Buchungscodes und Gutscheine"
|
||||
}
|
||||
|
||||
@@ -139,5 +139,9 @@
|
||||
"Room facilities": "Room facilities",
|
||||
"Hotel facilities": "Hotel facilities",
|
||||
"Hotel surroundings": "Hotel surroundings",
|
||||
"Show map": "Show map"
|
||||
"Show map": "Show map",
|
||||
"Where to": "Where to",
|
||||
"When": "When",
|
||||
"Rooms & Guests": "Rooms & Guests",
|
||||
"Booking codes and vouchers": "Booking codes and vouchers"
|
||||
}
|
||||
|
||||
@@ -134,5 +134,9 @@
|
||||
"Room facilities": "Huoneen varustelu",
|
||||
"Hotel facilities": "Hotellin palvelut",
|
||||
"Hotel surroundings": "Hotellin ympäristö",
|
||||
"Show map": "Näytä kartta"
|
||||
"Show map": "Näytä kartta",
|
||||
"Where to": "Minne",
|
||||
"When": "Kun",
|
||||
"Rooms & Guestss": "Huoneet & Vieraat",
|
||||
"Booking codes and vouchers": "Varauskoodit ja kupongit"
|
||||
}
|
||||
|
||||
@@ -134,5 +134,9 @@
|
||||
"Room facilities": "Romfasiliteter",
|
||||
"Hotel facilities": "Hotelfaciliteter",
|
||||
"Hotel surroundings": "Hotellomgivelser",
|
||||
"Show map": "Vis kart"
|
||||
"Show map": "Vis kart",
|
||||
"Where to": "Hvor skal du",
|
||||
"When": "Når",
|
||||
"Rooms & Guests": "Rom og gjester",
|
||||
"Booking codes and vouchers": "Bestillingskoder og kuponger"
|
||||
}
|
||||
|
||||
@@ -136,5 +136,9 @@
|
||||
"Room facilities": "Rumlfaciliteter",
|
||||
"Hotel facilities": "Hotellfaciliteter",
|
||||
"Hotel surroundings": "Hotellomgivning",
|
||||
"Show map": "Visa karta"
|
||||
"Show map": "Visa karta",
|
||||
"Where to": "Vart",
|
||||
"When": "När",
|
||||
"Rooms & Guests": "Rum och gäster",
|
||||
"Booking codes and vouchers": "Bokningskoder och kuponger"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user