fix: make summary sticky

This commit is contained in:
Christel Westerberg
2024-10-25 11:09:03 +02:00
parent 7954c704d9
commit 7710d3f8f9
16 changed files with 170 additions and 107 deletions

View File

@@ -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>
)
}