From 1ec4e5f583e04582e546f03b06749f4bab71e61d Mon Sep 17 00:00:00 2001 From: Vula Builder Date: Tue, 14 Jul 2026 19:09:01 +0000 Subject: [PATCH] Deploy --- .../sections/ExclusiveSuitesSection.tsx | 92 +++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 src/components/sections/ExclusiveSuitesSection.tsx diff --git a/src/components/sections/ExclusiveSuitesSection.tsx b/src/components/sections/ExclusiveSuitesSection.tsx new file mode 100644 index 0000000..e8cb1b2 --- /dev/null +++ b/src/components/sections/ExclusiveSuitesSection.tsx @@ -0,0 +1,92 @@ +'use client' + +import Image from 'next/image' +import Link from 'next/link' +import { useMedusaProducts } from '@/hooks/useMedusaProducts' +import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/Card' +import { Star, Users } from 'lucide-react' +import Button from '@/components/ui/Button' + +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 ExclusiveSuitesSection() { + const { products: suites, isLoading } = useMedusaProducts(6) + + return ( +
+
+
+

+ Six sanctuaries, each a world apart +

+

+ Every suite is a private hideaway — handcrafted with local stone, reclaimed timber, and panoramic glass overlooking the bushveld. +

+
+ + {isLoading ? ( +
+ {Array.from({ length: 6 }).map((_, i) => ( +
+
+
+
+
+
+
+
+ ))} +
+ ) : ( +
+ {suites?.slice(0, 6).map((suite) => { + const price = suite.variants?.[0]?.prices?.[0] + return ( + +
+ {suite.title} +
+ Up to 2 guests +
+
+ + {suite.title} + + +

{suite.description?.substring(0, 120)}…

+ {price && ( +

{formatPrice(price.amount, price.currency_code)} / night

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