feat: break apart loading of room availability and hotel card
feat: add skeletons
This commit is contained in:
@@ -4,9 +4,9 @@ import { Suspense } from "react"
|
||||
import { dt } from "@/lib/dt"
|
||||
import { getHotelData, getLocations } from "@/lib/trpc/memoizedRequests"
|
||||
|
||||
import LoadingSpinner from "@/components/Current/LoadingSpinner"
|
||||
import HotelInfoCard from "@/components/HotelReservation/SelectRate/HotelInfoCard"
|
||||
import { RoomsContainer } from "@/components/HotelReservation/SelectRate/Rooms/RoomsContainer"
|
||||
import { RoomsContainerSkeleton } from "@/components/HotelReservation/SelectRate/Rooms/RoomsContainerSkeleton"
|
||||
import { getHotelReservationQueryParams } from "@/components/HotelReservation/SelectRate/RoomSelection/utils"
|
||||
import { setLang } from "@/i18n/serverContext"
|
||||
import { safeTry } from "@/utils/safeTry"
|
||||
@@ -71,7 +71,8 @@ export default async function SelectRatePage({
|
||||
adultCount={adults}
|
||||
childArray={children ?? []}
|
||||
/>
|
||||
<Suspense key={hotelId} fallback={<LoadingSpinner />}>
|
||||
|
||||
<Suspense key={hotelId} fallback={<RoomsContainerSkeleton />}>
|
||||
<RoomsContainer
|
||||
hotelId={hotelId}
|
||||
lang={params.lang}
|
||||
|
||||
Reference in New Issue
Block a user