feat: trigger loading states immediately upon navigation

This commit is contained in:
Simon Emanuelsson
2025-05-06 17:01:37 +02:00
parent aaffcba94a
commit c5d4895b6d
16 changed files with 358 additions and 201 deletions

View File

@@ -11,7 +11,10 @@ import type {
} from "@/types/components/hotelReservation/selectHotel/availabilityInput"
import type { CategorizedFilters } from "@/types/components/hotelReservation/selectHotel/hotelFilters"
import { AvailabilityEnum } from "@/types/components/hotelReservation/selectHotel/selectHotel"
import type { SelectHotelSearchParams } from "@/types/components/hotelReservation/selectHotel/selectHotelSearchParams"
import type {
AlternativeHotelsSearchParams,
SelectHotelSearchParams,
} from "@/types/components/hotelReservation/selectHotel/selectHotelSearchParams"
import type { AdditionalData, DetailedFacility, Hotel } from "@/types/hotel"
import type { HotelsAvailabilityItem } from "@/types/trpc/routers/hotel/availability"
import type {
@@ -155,7 +158,7 @@ function sortAndFilterHotelsByAvailability(
}
export async function getHotels(
booking: SelectHotelSearchParams,
booking: SelectHotelSearchParams | AlternativeHotelsSearchParams,
isAlternativeFor: HotelLocation | null,
bookingCode: string | undefined,
city: Location,