fix(SW-1143) removed async from fallback

This commit is contained in:
Pontus Dreij
2024-12-10 15:02:14 +01:00
parent f9e50b7ea7
commit a7b193c96d
4 changed files with 13 additions and 13 deletions

View File

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

View File

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

View File

@@ -8,7 +8,7 @@ type Props = {
count?: number count?: number
} }
export async function SelectHotelMapContainerSkeleton({ count = 2 }: Props) { export function SelectHotelMapContainerSkeleton({ count = 2 }: Props) {
return ( return (
<div className={styles.container}> <div className={styles.container}>
<div className={styles.listingContainer}> <div className={styles.listingContainer}>

View File

@@ -8,7 +8,7 @@ type Props = {
count?: number count?: number
} }
export async function SelectHotelSkeleton({ count = 4 }: Props) { export function SelectHotelSkeleton({ count = 4 }: Props) {
return ( return (
<div className={styles.skeletonContainer}> <div className={styles.skeletonContainer}>
<header className={styles.header}> <header className={styles.header}>