Files
web/apps/scandic-web/constants/myBooking.ts
Chuma Mcphoy (We Ahead) 56d5ad77d1 Merged in fix/SW-2068-correct-public-url-from-my-stays-overview-page (pull request #1694)
feat(SW-2068): Link to Correct Public URL from within My Stays Overview Page

* feat(SW-2068): Link to Correct Public URL from within My Stays Overview Page

- Added language parameter to previous and upcoming stays queries.
- Updated Client components to utilize the new language hook.
- Refactored EmptyUpcomingStays component to dynamically generate links based on the current language.
- Adjusted user input validation to include optional language parameter.

* refactor(SW-2068): Update EmptyUpcomingStays components to use PUBLIC_URL + add utility to handle TLD based on language

* chore(SW-2068): Clarify TLD

* feat(SW-2068): documentation for getTldForLanguage

* refactor(SW-2068): Simplify booking URL construction in updateStaysBookingUrl

* refactor(SW-2068): Remove incorrect TLD update logic from booking URL construction

* refactor(SW-2068): Centralize booking URL paths using myBookingPath constant

* refactor(SW-2068): Streamline search params in booking URL construction logic in updateStaysBookingUrl


Approved-by: Christian Andolf
2025-04-02 12:44:02 +00:00

38 lines
1.5 KiB
TypeScript

import type { LangRoute } from "@/types/routes"
export const myBookingPath: LangRoute = {
da: "/hotelreservation/min-booking",
de: "/hotelreservation/my-booking",
en: "/hotelreservation/my-booking",
fi: "/varaa-hotelli/varauksesi",
no: "/hotelreservation/my-booking",
sv: "/hotelreservation/din-bokning",
}
export const myBooking = {
development: {
da: `https://stage.scandichotels.dk${myBookingPath.da}`,
de: `https://stage.scandichotels.de${myBookingPath.de}`,
en: `https://stage.scandichotels.com${myBookingPath.en}`,
fi: `https://stage.scandichotels.fi${myBookingPath.fi}`,
no: `https://stage.scandichotels.no${myBookingPath.no}`,
sv: `https://stage.scandichotels.se${myBookingPath.sv}`,
},
production: {
da: `https://www.scandichotels.dk${myBookingPath.da}`,
de: `https://www.scandichotels.de${myBookingPath.de}`,
en: `https://www.scandichotels.com${myBookingPath.en}`,
fi: `https://www.scandichotels.fi${myBookingPath.fi}`,
no: `https://www.scandichotels.no${myBookingPath.no}`,
sv: `https://www.scandichotels.se${myBookingPath.sv}`,
},
test: {
da: `https://test.scandichotels.dk${myBookingPath.da}`,
de: `https://test.scandichotels.de${myBookingPath.de}`,
en: `https://test.scandichotels.com${myBookingPath.en}`,
fi: `https://test.scandichotels.fi${myBookingPath.fi}`,
no: `https://test.scandichotels.no${myBookingPath.no}`,
sv: `https://test.scandichotels.se${myBookingPath.sv}`,
},
}