fix(SW-1111) Added Loading instead of Suspense

This commit is contained in:
Pontus Dreij
2024-12-09 16:46:00 +01:00
parent 05cd62e339
commit 7f50d34431
2 changed files with 11 additions and 8 deletions

View File

@@ -0,0 +1,5 @@
import { SelectHotelMapContainerSkeleton } from "@/components/HotelReservation/SelectHotel/SelectHotelMap/SelectHotelMapContainerSkeleton"
export default function Loading() {
return <SelectHotelMapContainerSkeleton />
}

View File

@@ -44,14 +44,12 @@ export default async function SelectHotelMapPage({
return (
<div className={styles.main}>
<MapContainer>
<Suspense key={city.id} fallback={<SelectHotelMapContainerSkeleton />}>
<SelectHotelMapContainer
city={city}
searchParams={searchParams}
adultsInRoom={adultsInRoom}
childrenInRoom={childrenInRoom}
/>
</Suspense>
<SelectHotelMapContainer
city={city}
searchParams={searchParams}
adultsInRoom={adultsInRoom}
childrenInRoom={childrenInRoom}
/>
</MapContainer>
</div>
)