From c5d04f01912ae8152bf97a2aabff9e9d78787e7f Mon Sep 17 00:00:00 2001 From: Vula Builder Date: Wed, 15 Jul 2026 09:25:29 +0000 Subject: [PATCH] Deploy --- .../sections/UbuhleSuitesSection.tsx | 97 +++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 src/components/sections/UbuhleSuitesSection.tsx diff --git a/src/components/sections/UbuhleSuitesSection.tsx b/src/components/sections/UbuhleSuitesSection.tsx new file mode 100644 index 0000000..9c508a2 --- /dev/null +++ b/src/components/sections/UbuhleSuitesSection.tsx @@ -0,0 +1,97 @@ +'use client' + +import { useMedusaProducts } from '@/hooks/useMedusaProducts' +import { Card, CardHeader, CardTitle, CardContent, CardFooter } from '@/components/ui/Card' +import Button from '@/components/ui/Button' +import Image from 'next/image' +import Link from 'next/link' + +const CURRENCY_SYMBOLS: Record = { zar: 'R', usd: '$', eur: '€', gbp: '£', kes: 'KSh', ngn: '₦', ghs: '₵' } +const formatPrice = (amount: number, code?: string) => { + const sym = CURRENCY_SYMBOLS[(code ?? '').toLowerCase()] ?? (code?.toUpperCase() ?? '') + return `${sym}${(amount / 100).toFixed(2)}` +} + +export default function UbuhleSuitesSection() { + const { products: rooms, isLoading, error } = useMedusaProducts(6) + + if (isLoading) { + return ( +
+
+
+
+
+
+ {[1,2,3].map(i =>
)} +
+
+
+
+ ) + } + + if (error) { + return ( +
+
+

Could not load suites. Please try again later.

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

Ubuhle Suites — Your Sanctuary in the Wild

+

+ Each of our six suites is a canvas of Zulu craftsmanship, quiet luxury, and sweeping views of the KwaZulu-Natal bushveld. +

+
+ +
+ {rooms?.map((room) => { + const variant = room.variants?.[0] + const price = variant?.prices?.[0] + const imageUrl = room.thumbnail || + 'https://images.pexels.com/photos/16436960/pexels-photo-16436960.jpeg?auto=compress&cs=tinysrgb&h=350' + + return ( + +
+ {room.title} +
+ + {room.title} +

+ {room.description || 'A luxurious bush retreat designed for rest and discovery.'} +

+ {price && ( +

+ {formatPrice(price.amount, price.currency_code)} +

+ )} +
+ + + + + +
+ ) + })} +
+
+
+ ) +} \ No newline at end of file