Merged in feat/hotelinfocard-skeleton (pull request #1291)

feat: added skeleton to hotelinfo card

* feat: added skeleton to hotelinfo card


Approved-by: Simon.Emanuelsson
This commit is contained in:
Linus Flood
2025-02-10 12:49:27 +00:00
parent eb0b88f8ea
commit 2522cd7752
2 changed files with 62 additions and 9 deletions

View File

@@ -4,7 +4,9 @@ import { Suspense } from "react"
import { getHotel } from "@/lib/trpc/memoizedRequests"
import HotelInfoCard from "@/components/HotelReservation/SelectRate/HotelInfoCard"
import HotelInfoCard, {
HotelInfoCardSkeleton,
} from "@/components/HotelReservation/SelectRate/HotelInfoCard"
import { RoomsContainer } from "@/components/HotelReservation/SelectRate/Rooms/RoomsContainer"
import { RoomsContainerSkeleton } from "@/components/HotelReservation/SelectRate/Rooms/RoomsContainerSkeleton"
import TrackingSDK from "@/components/TrackingSDK"
@@ -81,14 +83,19 @@ export default async function SelectRatePage({
return (
<>
<HotelInfoCard
hotelId={hotelId}
lang={params.lang}
fromDate={fromDate.toDate()}
toDate={toDate.toDate()}
adultArray={adultsInRoom}
childArray={childrenInRoom}
/>
<Suspense
key={JSON.stringify(searchParams)}
fallback={<HotelInfoCardSkeleton />}
>
<HotelInfoCard
hotelId={hotelId}
lang={params.lang}
fromDate={fromDate.toDate()}
toDate={toDate.toDate()}
adultArray={adultsInRoom}
childArray={childrenInRoom}
/>
</Suspense>
<Suspense
key={JSON.stringify(searchParams)}