From ff8d52dddb08068cf773a784b9fea8ef4dc00506 Mon Sep 17 00:00:00 2001 From: Vula Builder Date: Tue, 23 Jun 2026 08:39:14 +0000 Subject: [PATCH] Deploy --- .../sections/ThemedEnSuiteSection.tsx | 122 ++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 src/components/sections/ThemedEnSuiteSection.tsx diff --git a/src/components/sections/ThemedEnSuiteSection.tsx b/src/components/sections/ThemedEnSuiteSection.tsx new file mode 100644 index 0000000..9378243 --- /dev/null +++ b/src/components/sections/ThemedEnSuiteSection.tsx @@ -0,0 +1,122 @@ +'use client' + +import { useState } from "react" +import { useMedusaProducts } from "@/hooks/useMedusaProducts" +import Button from "@/components/ui/Button" +import Badge from "@/components/ui/Badge" +import { Card, CardHeader, CardTitle, CardContent, CardFooter } from "@/components/ui/Card" +import { Shield, Tv, Wifi, Wind } from 'lucide-react' + +export default function ThemedEnSuiteSection() { + const { products: rooms, isLoading, error } = useMedusaProducts({ limit: 8 }) + + if (isLoading) { + return ( +
+
+
+
+
+ ) + } + + if (error) { + return ( +
+
+

Unable to load rooms. Please try again later.

+
+
+ ) + } + + const displayRooms = (rooms ?? []).slice(0, 8) + + if (displayRooms.length === 0) { + return ( +
+
+

No rooms currently available. Check back soon.

+
+
+ ) + } + + return ( +
+
+
+

+ Themed En-Suite Rooms +

+

+ Each room is uniquely styled with its own personality — air-conditioned, with DStv and premium comfort. +

+
+ +
+ {displayRooms.map((room) => { + const price = room.variants?.[0]?.prices?.[0] + const formattedPrice = price + ? `R${(price.amount / 100).toFixed(2)}` + : "" + + return ( + +
+ {room.thumbnail ? ( + {room.title} + ) : ( +
+ +
+ )} +
+ + {room.title} + + +

{room.description}

+
+ + Air-con + + + DStv + +
+
+ + {formattedPrice && ( + {formattedPrice} / night + )} + + +
+ ) + })} +
+ +
+ +
+
+
+ ) +} \ No newline at end of file