feat: break apart loading of room availability and hotel card

feat: add skeletons
This commit is contained in:
Joakim Jäderberg
2024-11-20 10:17:55 +01:00
parent c4caccae5a
commit dfdbdb7621
8 changed files with 97 additions and 32 deletions

View File

@@ -0,0 +1,24 @@
import Body from "@/components/TempDesignSystem/Text/Body"
import { getIntl } from "@/i18n"
import { RoomCardSkeleton } from "../RoomSelection/RoomCard/RoomCardSkeleton"
import styles from "./RoomsContainerSkeleton.module.css"
type Props = {
count?: number
}
export async function RoomsContainerSkeleton({ count = 4 }: Props) {
const intl = await getIntl()
return (
<div className={styles.container}>
<div className={styles.filterContainer}></div>
<div className={styles.skeletonContainer}>
{Array.from({ length: count }).map((_, index) => (
<RoomCardSkeleton key={index} />
))}
</div>
</div>
)
}