From fa1ace9a2cb04c19a96b1b4157c1102323578c23 Mon Sep 17 00:00:00 2001 From: Arvid Norlin Date: Mon, 5 May 2025 16:59:35 +0200 Subject: [PATCH] fix: remove lingering cancel/error message based on sessionStorage --- .../(public)/hotelreservation/(standard)/details/page.tsx | 4 +++- .../components/hotelReservation/selectRate/selectRate.ts | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/scandic-web/app/[lang]/(live)/(public)/hotelreservation/(standard)/details/page.tsx b/apps/scandic-web/app/[lang]/(live)/(public)/hotelreservation/(standard)/details/page.tsx index 7ffa673ee..a8c5073b0 100644 --- a/apps/scandic-web/app/[lang]/(live)/(public)/hotelreservation/(standard)/details/page.tsx +++ b/apps/scandic-web/app/[lang]/(live)/(public)/hotelreservation/(standard)/details/page.tsx @@ -37,7 +37,9 @@ export default async function DetailsPage({ searchParams, }: PageArgs) { const selectRoomParams = new URLSearchParams(searchParams) - const booking = convertSearchParamsToObj(searchParams) + + const { errorCode, ...booking } = + convertSearchParamsToObj(searchParams) if ("modifyRateIndex" in booking) { selectRoomParams.delete("modifyRateIndex") delete booking.modifyRateIndex diff --git a/apps/scandic-web/types/components/hotelReservation/selectRate/selectRate.ts b/apps/scandic-web/types/components/hotelReservation/selectRate/selectRate.ts index 4866a354f..93369f85e 100644 --- a/apps/scandic-web/types/components/hotelReservation/selectRate/selectRate.ts +++ b/apps/scandic-web/types/components/hotelReservation/selectRate/selectRate.ts @@ -24,6 +24,7 @@ export interface Room { export interface SelectRateSearchParams { bookingCode?: string city?: string + errorCode?: string fromDate: string hotelId: string rooms: Room[]