@@ -34,7 +38,7 @@ export default async function TopMenu() {
-
+
{intl.formatMessage({ id: "Find booking" })}
diff --git a/apps/scandic-web/components/HotelReservation/FindMyBooking/findMyBooking.module.css b/apps/scandic-web/components/HotelReservation/FindMyBooking/findMyBooking.module.css
new file mode 100644
index 000000000..5f4d37d3a
--- /dev/null
+++ b/apps/scandic-web/components/HotelReservation/FindMyBooking/findMyBooking.module.css
@@ -0,0 +1,51 @@
+.form {
+ box-shadow: 0 0 14px 6px rgba(0, 0, 0, 0.1);
+}
+
+.form > div {
+ padding: var(--Spacing-x3);
+}
+
+.inputs {
+ display: grid;
+ gap: var(--Spacing-x3);
+}
+
+@media screen and (min-width: 768px) {
+ .inputs {
+ grid-template-areas:
+ "a a"
+ "b c"
+ "d d";
+ }
+
+ .inputs > div:nth-child(1) {
+ grid-area: a;
+ }
+ .inputs > div:nth-child(2) {
+ grid-area: b;
+ }
+ .inputs > div:nth-child(3) {
+ grid-area: c;
+ }
+ .inputs > div:nth-child(4) {
+ grid-area: d;
+ }
+}
+
+.buttons {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ border-top: 1px solid var(--Base-Border-Subtle);
+ gap: var(--Spacing-x2);
+}
+
+.buttons > button {
+ min-width: 140px;
+}
+
+.footnote {
+ display: grid;
+ gap: var(--Spacing-x-half);
+}
diff --git a/apps/scandic-web/components/HotelReservation/FindMyBooking/index.tsx b/apps/scandic-web/components/HotelReservation/FindMyBooking/index.tsx
new file mode 100644
index 000000000..f74d29dbc
--- /dev/null
+++ b/apps/scandic-web/components/HotelReservation/FindMyBooking/index.tsx
@@ -0,0 +1,134 @@
+"use client"
+
+import { zodResolver } from "@hookform/resolvers/zod"
+import { useRouter } from "next/navigation"
+import { FormProvider, useForm } from "react-hook-form"
+import { useIntl } from "react-intl"
+
+import { customerService } from "@/constants/currentWebHrefs"
+import { trpc } from "@/lib/trpc/client"
+
+import Button from "@/components/TempDesignSystem/Button"
+import Input from "@/components/TempDesignSystem/Form/Input"
+import Link from "@/components/TempDesignSystem/Link"
+import Body from "@/components/TempDesignSystem/Text/Body"
+import Caption from "@/components/TempDesignSystem/Text/Caption"
+import Title from "@/components/TempDesignSystem/Text/Title"
+import useLang from "@/hooks/useLang"
+
+import { type FindMyBookingFormSchema, findMyBookingFormSchema } from "./schema"
+
+import styles from "./findMyBooking.module.css"
+
+export default function Form() {
+ const router = useRouter()
+ const intl = useIntl()
+ const lang = useLang()
+ const form = useForm
({
+ defaultValues: {
+ reservationNumber: "",
+ firstName: "",
+ lastName: "",
+ email: "",
+ },
+ resolver: zodResolver(findMyBookingFormSchema),
+ mode: "all",
+ criteriaMode: "all",
+ reValidateMode: "onChange",
+ })
+
+ const update = trpc.booking.createRefId.useMutation({
+ onSuccess: (result) => {
+ router.push(
+ `/${lang}/hotelreservation/my-stay/${encodeURIComponent(result.refId)}`
+ )
+ },
+ onError: (error) => {
+ console.log("Failed to create ref id", error)
+ },
+ })
+
+ async function onSubmit(data: FindMyBookingFormSchema) {
+ const value = new URLSearchParams(data).toString()
+ document.cookie = `bv=${value}; Path=/; Max-Age=30; Secure; SameSite=Strict`
+ update.mutate({
+ confirmationNumber: data.reservationNumber,
+ lastName: data.lastName,
+ })
+ }
+ return (
+
+
+
+ )
+}
diff --git a/apps/scandic-web/components/HotelReservation/FindMyBooking/schema.ts b/apps/scandic-web/components/HotelReservation/FindMyBooking/schema.ts
new file mode 100644
index 000000000..6992d2694
--- /dev/null
+++ b/apps/scandic-web/components/HotelReservation/FindMyBooking/schema.ts
@@ -0,0 +1,15 @@
+import { z } from "zod"
+
+export const findMyBookingFormSchema = z.object({
+ reservationNumber: z.string(),
+ firstName: z.string().max(250).trim().min(1, {
+ message: "First name is required",
+ }),
+ lastName: z.string().max(250).trim().min(1, {
+ message: "Last name is required",
+ }),
+ email: z.string().max(250).email(),
+})
+
+export interface FindMyBookingFormSchema
+ extends z.output {}
diff --git a/apps/scandic-web/constants/routes/findMyBooking.js b/apps/scandic-web/constants/routes/findMyBooking.js
new file mode 100644
index 000000000..a8b3f4568
--- /dev/null
+++ b/apps/scandic-web/constants/routes/findMyBooking.js
@@ -0,0 +1,14 @@
+/**
+ * @file Due to these records being used in next.config.js, and that is required
+ * to be a js file, we use jsdoc to type these.
+ */
+
+/** @type {import('@/types/routes').LangRoute} */
+export const findMyBooking = {
+ da: "/da/hotelreservation/hent-booking",
+ de: "/de/hotelreservation/mein-bereich",
+ en: "/en/hotelreservation/get-booking",
+ fi: "/fi/hotelreservation/hae-varaus",
+ no: "/no/hotelreservation/get-booking",
+ sv: "/sv/hotelreservation/hitta-bokning",
+}
diff --git a/apps/scandic-web/i18n/dictionaries/da.json b/apps/scandic-web/i18n/dictionaries/da.json
index 48de079ce..0343bf5ce 100644
--- a/apps/scandic-web/i18n/dictionaries/da.json
+++ b/apps/scandic-web/i18n/dictionaries/da.json
@@ -107,6 +107,7 @@
"By signing up you accept the Scandic Friends Terms and Conditions. Your membership is valid until further notice, and you can terminate your membership at any time by sending an email to Scandic's customer service": "Ved at tilmelde dig accepterer du Scandic Friends vilkår og betingelser. Dit medlemskab er gyldigt indtil videre, og du kan til enhver tid opsige dit medlemskab ved at sende en e-mail til Scandics kundeservice",
"Cabaret seating": "Cabaret seating",
"Campaign": "Kampagne",
+ "Can't find your stay?": "Kan du ikke finde dit ophold?",
"Cancel": "Afbestille",
"Cancel stay": "Annuller ophold",
"Cancellation cost": "Annulleret pris",
@@ -227,9 +228,11 @@
"Filter": "Filter",
"Filter and sort": "Filtrer og sorter",
"Filter by": "Filtrer efter",
+ "Find": "Finde",
"Find booking": "Find booking",
"Find hotels": "Find hotel",
"Find hotels and destinations": "Find hoteller og destinationer",
+ "Find your stay": "Find dit ophold",
"First name": "Fornavn",
"First name can't contain any special characters": "Fornavn kan ikke indeholde specielle tegn",
"First name is required": "Fornavn er påkrævet",
@@ -469,6 +472,7 @@
"Phone": "Telefon",
"Phone is required": "Telefonnummer er påkrævet",
"Phone number": "Telefonnummer",
+ "Please contact customer service.": "Kontakt venligst kundeservice.",
"Please enter a valid phone number": "Indtast venligst et gyldigt telefonnummer",
"Please enter the code sent to in order to confirm your account linking.": "Please enter the code sent to in order to confirm your account linking.",
"Please enter the code sent to in order to unlink your accounts.": "Please enter the code sent to in order to unlink your accounts.",
@@ -653,6 +657,7 @@
"View all": "Vis alle",
"View all hotels in {country}": "Se alle hoteller i {country}",
"View and buy add-ons": "View and buy add-ons",
+ "View and manage your stay made on Scandic's website": "Se og administrer dit ophold på Scandics hjemmeside",
"View as list": "Vis som liste",
"View as map": "Vis som kort",
"View room details": "View room details",
diff --git a/apps/scandic-web/i18n/dictionaries/de.json b/apps/scandic-web/i18n/dictionaries/de.json
index 2b3fea97a..7e50fe55b 100644
--- a/apps/scandic-web/i18n/dictionaries/de.json
+++ b/apps/scandic-web/i18n/dictionaries/de.json
@@ -108,6 +108,7 @@
"By signing up you accept the Scandic Friends Terms and Conditions. Your membership is valid until further notice, and you can terminate your membership at any time by sending an email to Scandic's customer service": "Mit Ihrer Anmeldung akzeptieren Sie die Allgemeinen Geschäftsbedingungen von Scandic Friends. Ihre Mitgliedschaft ist bis auf Weiteres gültig und Sie können sie jederzeit kündigen, indem Sie eine E-Mail an den Kundenservice von Scandic senden.",
"Cabaret seating": "Cabaret seating",
"Campaign": "Kampagne",
+ "Can't find your stay?": "Sie können Ihren Aufenthalt nicht finden?",
"Cancel": "Stornieren",
"Cancel stay": "Stornieren",
"Cancellation cost": "Stornierungskosten",
@@ -228,9 +229,11 @@
"Filter": "Filter",
"Filter and sort": "Filtern und sortieren",
"Filter by": "Filtern nach",
+ "Find": "Finden",
"Find booking": "Buchung finden",
"Find hotels": "Hotels finden",
"Find hotels and destinations": "Finden Sie Hotels und Reiseziele",
+ "Find your stay": "Finden Sie Ihren Aufenthalt",
"First name": "Vorname",
"First name can't contain any special characters": "Der Vorname darf keine Sonderzeichen enthalten",
"First name is required": "Vorname ist erforderlich",
@@ -471,6 +474,7 @@
"Phone": "Telefon",
"Phone is required": "Telefon ist erforderlich",
"Phone number": "Telefonnummer",
+ "Please contact customer service.": "Bitte wenden Sie sich an den Kundendienst.",
"Please enter a valid phone number": "Bitte geben Sie eine gültige Telefonnummer ein",
"Please enter the code sent to in order to confirm your account linking.": "Please enter the code sent to in order to confirm your account linking.",
"Please enter the code sent to in order to unlink your accounts.": "Please enter the code sent to in order to unlink your accounts.",
@@ -654,6 +658,7 @@
"View all": "Alle anzeigen",
"View all hotels in {country}": "Alle Hotels in {country} anzeigen",
"View and buy add-ons": "View and buy add-ons",
+ "View and manage your stay made on Scandic's website": "Sehen und verwalten Sie Ihren Aufenthalt auf der Website von Scandic",
"View as list": "Als Liste anzeigen",
"View as map": "Als Karte anzeigen",
"View room details": "View room details",
diff --git a/apps/scandic-web/i18n/dictionaries/en.json b/apps/scandic-web/i18n/dictionaries/en.json
index 83e64311c..c8b416c7a 100644
--- a/apps/scandic-web/i18n/dictionaries/en.json
+++ b/apps/scandic-web/i18n/dictionaries/en.json
@@ -107,6 +107,7 @@
"By signing up you accept the Scandic Friends Terms and Conditions. Your membership is valid until further notice, and you can terminate your membership at any time by sending an email to Scandic's customer service": "By signing up you accept the Scandic Friends Terms and Conditions. Your membership is valid until further notice, and you can terminate your membership at any time by sending an email to Scandic's customer service",
"Cabaret seating": "Cabaret seating",
"Campaign": "Campaign",
+ "Can't find your stay?": "Can't find your stay?",
"Cancel": "Cancel",
"Cancel booking": "Cancel booking",
"Cancel stay": "Cancel stay",
@@ -229,9 +230,11 @@
"Filter": "Filter",
"Filter and sort": "Filter and sort",
"Filter by": "Filter by",
+ "Find": "Find",
"Find booking": "Find booking",
"Find hotels": "Find hotels",
"Find hotels and destinations": "Find hotels and destinations",
+ "Find your stay": "Find your stay",
"First name": "First name",
"First name can't contain any special characters": "First name can't contain any special characters",
"First name is required": "First name is required",
@@ -473,6 +476,7 @@
"Phone": "Phone",
"Phone is required": "Phone is required",
"Phone number": "Phone number",
+ "Please contact customer service.": "Please contact customer service.",
"Please enter a valid phone number": "Please enter a valid phone number",
"Please enter the code sent to in order to confirm your account linking.": "Please enter the code sent to in order to confirm your account linking.",
"Please enter the code sent to in order to unlink your accounts.": "Please enter the code sent to in order to unlink your accounts.",
@@ -659,6 +663,7 @@
"View all": "View all",
"View all hotels in {country}": "View all hotels in {country}",
"View and buy add-ons": "View and buy add-ons",
+ "View and manage your stay made on Scandic's website": "View and manage your stay made on Scandic's website",
"View as list": "View as list",
"View as map": "View as map",
"View room details": "View room details",
diff --git a/apps/scandic-web/i18n/dictionaries/fi.json b/apps/scandic-web/i18n/dictionaries/fi.json
index 91085480d..8df26b51e 100644
--- a/apps/scandic-web/i18n/dictionaries/fi.json
+++ b/apps/scandic-web/i18n/dictionaries/fi.json
@@ -106,6 +106,7 @@
"By signing up you accept the Scandic Friends Terms and Conditions. Your membership is valid until further notice, and you can terminate your membership at any time by sending an email to Scandic's customer service": "Rekisteröitymällä hyväksyt Scandic Friendsin käyttöehdot. Jäsenyytesi on voimassa toistaiseksi ja voit lopettaa jäsenyytesi milloin tahansa lähettämällä sähköpostia Scandicin asiakaspalveluun",
"Cabaret seating": "Cabaret seating",
"Campaign": "Kampanja",
+ "Can't find your stay?": "Etkö löydä majoitusta?",
"Cancel": "Peruuttaa",
"Cancel stay": "Peruuta majoitus",
"Cancellation cost": "Peruutusmaksu",
@@ -227,9 +228,11 @@
"Filter": "Suodatin",
"Filter and sort": "Suodata ja lajittele",
"Filter by": "Suodatusperuste",
+ "Find": "Löytää",
"Find booking": "Etsi varaus",
"Find hotels": "Etsi hotelleja",
"Find hotels and destinations": "Etsi hotelleja ja kohteita",
+ "Find your stay": "Etsi majoitus",
"First name": "Etunimi",
"First name can't contain any special characters": "Etunimi ei voi sisältää erikoismerkkejä",
"First name is required": "Etunimi vaaditaan",
@@ -470,6 +473,7 @@
"Phone": "Puhelin",
"Phone is required": "Puhelin vaaditaan",
"Phone number": "Puhelinnumero",
+ "Please contact customer service.": "Ota yhteyttä asiakaspalveluun.",
"Please enter a valid phone number": "Ole hyvä ja näppäile voimassaoleva puhelinnumero",
"Please enter the code sent to in order to confirm your account linking.": "Please enter the code sent to in order to confirm your account linking.",
"Please enter the code sent to in order to unlink your accounts.": "Please enter the code sent to in order to unlink your accounts.",
@@ -654,6 +658,7 @@
"View all": "Näytä kaikki",
"View all hotels in {country}": "Näytä kaikki hotellit maassa {country}",
"View and buy add-ons": "View and buy add-ons",
+ "View and manage your stay made on Scandic's website": "Tarkastele ja hallinnoi yöpymistäsi Scandicin verkkosivuilla",
"View as list": "Näytä listana",
"View as map": "Näytä kartalla",
"View room details": "View room details",
diff --git a/apps/scandic-web/i18n/dictionaries/no.json b/apps/scandic-web/i18n/dictionaries/no.json
index 3d62310ba..9e4d8ead3 100644
--- a/apps/scandic-web/i18n/dictionaries/no.json
+++ b/apps/scandic-web/i18n/dictionaries/no.json
@@ -106,6 +106,7 @@
"By signing up you accept the Scandic Friends Terms and Conditions. Your membership is valid until further notice, and you can terminate your membership at any time by sending an email to Scandic's customer service": "Ved å registrere deg godtar du Scandic Friends vilkår og betingelser. Medlemskapet ditt er gyldig inntil videre, og du kan si opp medlemskapet ditt når som helst ved å sende en e-post til Scandics kundeservice",
"Cabaret seating": "Cabaret seating",
"Campaign": "Kampanje",
+ "Can't find your stay?": "Finner du ikke oppholdet ditt?",
"Cancel": "Avbryt",
"Cancel stay": "Avbryt opphold",
"Cancellation cost": "Annulleret pris",
@@ -226,9 +227,11 @@
"Filter": "Filter",
"Filter and sort": "Filtrer og sorter",
"Filter by": "Filtrer etter",
+ "Find": "Finne",
"Find booking": "Finn booking",
"Find hotels": "Finn hotell",
"Find hotels and destinations": "Finn hoteller og destinasjoner",
+ "Find your stay": "Finn ditt opphold",
"First name": "Fornavn",
"First name can't contain any special characters": "Fornavn kan ikke inneholde spesielle tegn",
"First name is required": "Fornavn kreves",
@@ -467,6 +470,7 @@
"Phone": "Telefon",
"Phone is required": "Telefon kreves",
"Phone number": "Telefonnummer",
+ "Please contact customer service.": "Vennligst kontakt kundeservice.",
"Please enter a valid phone number": "Vennligst oppgi et gyldig telefonnummer",
"Please enter the code sent to in order to confirm your account linking.": "Please enter the code sent to in order to confirm your account linking.",
"Please enter the code sent to in order to unlink your accounts.": "Please enter the code sent to in order to unlink your accounts.",
@@ -650,6 +654,7 @@
"View all": "Vis alle",
"View all hotels in {country}": "Se alle hotellene i {country}",
"View and buy add-ons": "View and buy add-ons",
+ "View and manage your stay made on Scandic's website": "Se og administrer ditt opphold på Scandics nettside",
"View as list": "Vis som liste",
"View as map": "Vis som kart",
"View room details": "View room details",
diff --git a/apps/scandic-web/i18n/dictionaries/sv.json b/apps/scandic-web/i18n/dictionaries/sv.json
index 87ccbf8bf..16e7667eb 100644
--- a/apps/scandic-web/i18n/dictionaries/sv.json
+++ b/apps/scandic-web/i18n/dictionaries/sv.json
@@ -106,6 +106,7 @@
"By signing up you accept the Scandic Friends Terms and Conditions. Your membership is valid until further notice, and you can terminate your membership at any time by sending an email to Scandic's customer service": "Genom att registrera dig accepterar du Scandic Friends Användarvillkor. Ditt medlemskap gäller tills vidare och du kan när som helst säga upp ditt medlemskap genom att skicka ett mejl till Scandics kundtjänst",
"Cabaret seating": "Cabaret seating",
"Campaign": "Kampanj",
+ "Can't find your stay?": "Hittar du inte din vistelse?",
"Cancel": "Avbryt",
"Cancel stay": "Avboka vistelse",
"Cancellation cost": "Avbokningskostnad",
@@ -226,9 +227,11 @@
"Filter": "Filter",
"Filter and sort": "Filtrera och sortera",
"Filter by": "Filtrera på",
+ "Find": "Hitta",
"Find booking": "Hitta bokning",
"Find hotels": "Hitta hotell",
"Find hotels and destinations": "Hitta hotell och destinationer",
+ "Find your stay": "Hitta din vistelse",
"First name": "Förnamn",
"First name can't contain any special characters": "Förnamn får inte innehålla några specialtecken",
"First name is required": "Förnamn är obligatoriskt",
@@ -467,6 +470,7 @@
"Phone": "Telefon",
"Phone is required": "Telefonnummer är obligatorisk",
"Phone number": "Telefonnummer",
+ "Please contact customer service.": "Vänligen kontakta kundtjänst.",
"Please enter a valid phone number": "Var vänlig och ange ett giltigt telefonnummer",
"Please enter the code sent to in order to confirm your account linking.": "Please enter the code sent to in order to confirm your account linking.",
"Please enter the code sent to in order to unlink your accounts.": "Please enter the code sent to in order to unlink your accounts.",
@@ -650,6 +654,7 @@
"View all": "Visa alla",
"View all hotels in {country}": "Visa alla hotell i {country}",
"View and buy add-ons": "View and buy add-ons",
+ "View and manage your stay made on Scandic's website": "Se och hantera din vistelse gjord på Scandics hemsida",
"View as list": "Visa som lista",
"View as map": "Visa som karta",
"View room details": "View room details",
diff --git a/apps/scandic-web/next.config.js b/apps/scandic-web/next.config.js
index 08c78e0f7..ebff44a71 100644
--- a/apps/scandic-web/next.config.js
+++ b/apps/scandic-web/next.config.js
@@ -2,6 +2,7 @@ import * as Sentry from "@sentry/nextjs"
import createJiti from "jiti"
import { fileURLToPath } from "url"
+import { findMyBooking } from "./constants/routes/findMyBooking.js"
import { login, logout } from "./constants/routes/handleAuth.js"
import { myPages } from "./constants/routes/myPages.js"
@@ -54,7 +55,7 @@ const nextConfig = {
output: "standalone",
- webpack: function (config, options) {
+ webpack: function (config) {
config.module.rules.push(
{
test: /\.(graphql|gql)/,
@@ -273,6 +274,31 @@ const nextConfig = {
destination:
"/:lang/hotelreservation/payment-callback?status=:status",
},
+ // Find my booking
+ {
+ source: findMyBooking.en,
+ destination: "/en/hotelreservation/get-booking",
+ },
+ {
+ source: findMyBooking.da,
+ destination: "/da/hotelreservation/get-booking",
+ },
+ {
+ source: findMyBooking.de,
+ destination: "/de/hotelreservation/get-booking",
+ },
+ {
+ source: findMyBooking.fi,
+ destination: "/fi/hotelreservation/get-booking",
+ },
+ {
+ source: findMyBooking.no,
+ destination: "/no/hotelreservation/get-booking",
+ },
+ {
+ source: findMyBooking.sv,
+ destination: "/sv/hotelreservation/get-booking",
+ },
],
}
},
diff --git a/apps/scandic-web/server/routers/booking/input.ts b/apps/scandic-web/server/routers/booking/input.ts
index 87bcc98be..c30bcb13d 100644
--- a/apps/scandic-web/server/routers/booking/input.ts
+++ b/apps/scandic-web/server/routers/booking/input.ts
@@ -108,6 +108,11 @@ export const cancelBookingInput = z.object({
language: z.nativeEnum(Lang).transform((val) => langToApiLang[val]),
})
+export const createRefIdInput = z.object({
+ confirmationNumber: z.string(),
+ lastName: z.string(),
+})
+
// Query
const confirmationNumberInput = z.object({
confirmationNumber: z.string(),
diff --git a/apps/scandic-web/server/routers/booking/query.ts b/apps/scandic-web/server/routers/booking/query.ts
index 5861b0da6..06c98d2e7 100644
--- a/apps/scandic-web/server/routers/booking/query.ts
+++ b/apps/scandic-web/server/routers/booking/query.ts
@@ -10,7 +10,12 @@ import {
} from "@/server/trpc"
import { getHotel } from "../hotels/query"
-import { bookingConfirmationInput, getBookingStatusInput } from "./input"
+import encryptValue from "../utils/encryptValue"
+import {
+ bookingConfirmationInput,
+ createRefIdInput,
+ getBookingStatusInput,
+} from "./input"
import { bookingConfirmationSchema, createBookingSchema } from "./output"
import { getBookedHotelRoom } from "./utils"
@@ -228,4 +233,14 @@ export const bookingQueryRouter = router({
return verifiedData.data
}),
+ createRefId: serviceProcedure
+ .input(createRefIdInput)
+ .mutation(async function ({ input }) {
+ const { confirmationNumber, lastName } = input
+ const encryptedRefId = encryptValue(`${confirmationNumber},${lastName}`)
+
+ return {
+ refId: encryptedRefId,
+ }
+ }),
})
diff --git a/apps/scandic-web/server/routers/contentstack/languageSwitcher/query.ts b/apps/scandic-web/server/routers/contentstack/languageSwitcher/query.ts
index f3ef894ac..003e3ac6e 100644
--- a/apps/scandic-web/server/routers/contentstack/languageSwitcher/query.ts
+++ b/apps/scandic-web/server/routers/contentstack/languageSwitcher/query.ts
@@ -2,6 +2,7 @@ import { metrics } from "@opentelemetry/api"
import { Lang } from "@/constants/languages"
import { baseUrls } from "@/constants/routes/baseUrls"
+import { findMyBooking } from "@/constants/routes/findMyBooking"
import { batchRequest } from "@/lib/graphql/batchRequest"
import {
GetDaDeEnUrlsAccountPage,
@@ -179,6 +180,18 @@ export const languageSwitcherQueryRouter = router({
}
if (!uid || !lang) {
+ // we have pages that are not currently routed within contentstack context,
+ // therefor this fix is needed for some of these pages
+ if (input && Object.values(findMyBooking).includes(input.pathName)) {
+ const urls: Record = {}
+ return {
+ lang,
+ urls: Object.entries(findMyBooking).reduce((acc, [lang, url]) => {
+ acc[lang] = { url }
+ return urls
+ }, urls),
+ }
+ }
return { lang: lang, urls: baseUrls }
}