fix: make sure all searchparams are used in redirect
This commit is contained in:
committed by
Simon.Emanuelsson
parent
1b3999a050
commit
744af22b08
@@ -83,10 +83,10 @@ export default async function SummaryPage({
|
||||
price: availability.publicRate.localPrice.pricePerStay,
|
||||
currency: availability.publicRate.localPrice.currency,
|
||||
},
|
||||
euro: availability.publicRate.requestedPrice
|
||||
euro: availability.publicRate?.requestedPrice
|
||||
? {
|
||||
price: availability.publicRate.requestedPrice.pricePerStay,
|
||||
currency: availability.publicRate.requestedPrice.currency,
|
||||
price: availability.publicRate?.requestedPrice.pricePerStay,
|
||||
currency: availability.publicRate?.requestedPrice.currency,
|
||||
}
|
||||
: undefined,
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import "./enterDetailsLayout.css"
|
||||
|
||||
import { notFound, redirect, RedirectType } from "next/navigation"
|
||||
import { notFound } from "next/navigation"
|
||||
|
||||
import {
|
||||
getBreakfastPackages,
|
||||
@@ -38,6 +38,8 @@ export default async function StepPage({
|
||||
}: PageArgs<LangParams, SelectRateSearchParams & { step: StepEnum }>) {
|
||||
const intl = await getIntl()
|
||||
const selectRoomParams = new URLSearchParams(searchParams)
|
||||
selectRoomParams.delete("step")
|
||||
const searchParamsString = selectRoomParams.toString()
|
||||
const {
|
||||
hotel: hotelId,
|
||||
rooms,
|
||||
@@ -123,6 +125,7 @@ export default async function StepPage({
|
||||
bedTypes={roomAvailability.bedTypes}
|
||||
breakfastPackages={breakfastPackages}
|
||||
isMember={!!user}
|
||||
searchParams={searchParamsString}
|
||||
step={searchParams.step}
|
||||
>
|
||||
<section>
|
||||
|
||||
Reference in New Issue
Block a user