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 ( return (
<div className={styles.main}> <div className={styles.main}>
<MapContainer> <MapContainer>
<Suspense key={city.id} fallback={<SelectHotelMapContainerSkeleton />}>
<SelectHotelMapContainer <SelectHotelMapContainer
city={city} city={city}
searchParams={searchParams} searchParams={searchParams}
adultsInRoom={adultsInRoom} adultsInRoom={adultsInRoom}
childrenInRoom={childrenInRoom} childrenInRoom={childrenInRoom}
/> />
</Suspense>
</MapContainer> </MapContainer>
</div> </div>
) )