diff --git a/apps/scandic-web/app/[lang]/(live)/@bookingwidget/(contentTypes)/hotel_page/[uid]/page.tsx b/apps/scandic-web/app/[lang]/(live)/@bookingwidget/(contentTypes)/hotel_page/[uid]/page.tsx
index 2326af0dc..9ffeface8 100644
--- a/apps/scandic-web/app/[lang]/(live)/@bookingwidget/(contentTypes)/hotel_page/[uid]/page.tsx
+++ b/apps/scandic-web/app/[lang]/(live)/@bookingwidget/(contentTypes)/hotel_page/[uid]/page.tsx
@@ -4,14 +4,14 @@ import { parseBookingWidgetSearchParams } from "@scandic-hotels/booking-flow/uti
import { bookingFlowConfig } from "@/constants/bookingFlowConfig"
import { getHotel, getHotelPage } from "@/lib/trpc/memoizedRequests"
-import type { Lang } from "@scandic-hotels/common/constants/language"
+import { getLang } from "@/i18n/serverContext"
export default async function BookingWidgetHotelPage(
props: PageProps<"/[lang]/hotel_page/[uid]">
) {
const searchParams = await props.searchParams
- const params = await props.params
- const lang = params.lang as Lang
+
+ const lang = await getLang()
const hotelPageData = await getHotelPage()
const hotelData = await getHotel({
diff --git a/apps/scandic-web/app/[lang]/(live)/@bookingwidget/hotelreservation/page.tsx b/apps/scandic-web/app/[lang]/(live)/@bookingwidget/hotelreservation/page.tsx
index 9a88da9a3..2ff07a557 100644
--- a/apps/scandic-web/app/[lang]/(live)/@bookingwidget/hotelreservation/page.tsx
+++ b/apps/scandic-web/app/[lang]/(live)/@bookingwidget/hotelreservation/page.tsx
@@ -3,17 +3,16 @@ import { parseBookingWidgetSearchParams } from "@scandic-hotels/booking-flow/uti
import { bookingFlowConfig } from "@/constants/bookingFlowConfig"
-import type { Lang } from "@scandic-hotels/common/constants/language"
+import { getLang } from "@/i18n/serverContext"
export default async function BookingWidgetPage(
props: PageProps<"/[lang]/hotelreservation">
) {
const searchParams = await props.searchParams
- const params = await props.params
const booking = parseBookingWidgetSearchParams(searchParams)
- const lang = params.lang as Lang
+ const lang = await getLang()
return (
diff --git a/apps/scandic-web/app/[lang]/(live)/@bookingwidget/page.tsx b/apps/scandic-web/app/[lang]/(live)/@bookingwidget/page.tsx
index a38a2024f..789af880b 100644
--- a/apps/scandic-web/app/[lang]/(live)/@bookingwidget/page.tsx
+++ b/apps/scandic-web/app/[lang]/(live)/@bookingwidget/page.tsx
@@ -3,15 +3,14 @@ import { parseBookingWidgetSearchParams } from "@scandic-hotels/booking-flow/uti
import { bookingFlowConfig } from "@/constants/bookingFlowConfig"
-import type { Lang } from "@scandic-hotels/common/constants/language"
+import { getLang } from "@/i18n/serverContext"
export default async function BookingWidgetPage(props: PageProps<"/[lang]">) {
const searchParams = await props.searchParams
- const params = await props.params
const booking = parseBookingWidgetSearchParams(searchParams)
- const lang = params.lang as Lang
+ const lang = await getLang()
return (
diff --git a/apps/scandic-web/components/HotelReservation/MyStay/index.tsx b/apps/scandic-web/components/HotelReservation/MyStay/index.tsx
index 19d648cd3..f010f7581 100644
--- a/apps/scandic-web/components/HotelReservation/MyStay/index.tsx
+++ b/apps/scandic-web/components/HotelReservation/MyStay/index.tsx
@@ -84,7 +84,7 @@ async function MyStay(props: {
if (isLoggedIn) {
bookingConfirmation = await getBookingConfirmation(refId)
} else if (bv) {
- logger.info(`MyStay: bv`, bv)
+ logger.debug(`MyStay: bv`, bv)
const {
firstName,
email,
diff --git a/apps/scandic-web/utils/getErrorMessage.ts b/apps/scandic-web/utils/getErrorMessage.ts
index 124439b55..010de0b38 100644
--- a/apps/scandic-web/utils/getErrorMessage.ts
+++ b/apps/scandic-web/utils/getErrorMessage.ts
@@ -185,6 +185,10 @@ export function getErrorMessage(intl: IntlShape, errorCode?: string) {
defaultMessage:
"Membership number can't be the same for two different rooms",
})
+ case undefined:
+ case null:
+ case "":
+ return errorCode
default:
logger.warn("Error code not supported:", errorCode)
return errorCode