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,21 @@
import SkeletonShimmer from "@/components/SkeletonShimmer"
import styles from "./RoomCardSkeleton.module.css"
export function RoomCardSkeleton() {
return (
<article className={styles.card}>
{/* image container */}
<div className={styles.imageContainer}>
<SkeletonShimmer width={"100%"} height="100%" />
</div>
<div className={styles.priceVariants}>
{/* price variants */}
{Array.from({ length: 3 }).map((_, index) => (
<SkeletonShimmer key={index} height={"100px"} />
))}
</div>
</article>
)
}