fix: make summary sticky
This commit is contained in:
@@ -20,7 +20,7 @@ import { getIntl } from "@/i18n"
|
||||
|
||||
import { StepEnum } from "@/types/components/hotelReservation/enterDetails/step"
|
||||
import { SelectRateSearchParams } from "@/types/components/hotelReservation/selectRate/selectRate"
|
||||
import type { LangParams, PageArgs, } from "@/types/params"
|
||||
import type { LangParams, PageArgs } from "@/types/params"
|
||||
|
||||
export function preload() {
|
||||
void getProfileSafely()
|
||||
@@ -34,12 +34,10 @@ function isValidStep(step: string): step is StepEnum {
|
||||
export default async function StepPage({
|
||||
params,
|
||||
searchParams,
|
||||
}: PageArgs<
|
||||
LangParams & { step: StepEnum },
|
||||
SelectRateSearchParams
|
||||
>) {
|
||||
}: PageArgs<LangParams & { step: StepEnum }, SelectRateSearchParams>) {
|
||||
const { lang } = params
|
||||
if (!searchParams.hotel) {
|
||||
redirect(`/${params.lang}`)
|
||||
redirect(`/${lang}`)
|
||||
}
|
||||
void getBreakfastPackages(searchParams.hotel)
|
||||
|
||||
@@ -64,7 +62,11 @@ export default async function StepPage({
|
||||
rateCode
|
||||
})
|
||||
|
||||
const hotelData = await getHotelData(hotelId, params.lang, undefined, [HotelIncludeEnum.RoomCategories])
|
||||
const hotelData = await getHotelData({
|
||||
hotelId,
|
||||
language: lang,
|
||||
include: [HotelIncludeEnum.RoomCategories],
|
||||
})
|
||||
|
||||
const user = await getProfileSafely()
|
||||
const savedCreditCards = await getCreditCardsSafely()
|
||||
@@ -153,6 +155,6 @@ export default async function StepPage({
|
||||
mustBeGuaranteed={mustBeGuaranteed}
|
||||
/>
|
||||
</SectionAccordion>
|
||||
</section >
|
||||
</section>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user