'use client' import { useMedusaProducts } from '@/hooks/useMedusaProducts' import Image from 'next/image' import Link from 'next/link' import { Card, CardHeader, CardTitle, CardContent } from '@/components/ui/Card' import Button from '@/components/ui/Button' import Badge from '@/components/ui/Badge' const CURRENCY_SYMBOLS: Record = { zar: 'R', usd: '$', eur: '€', gbp: '£' } const formatPrice = (amount: number, code?: string) => { const sym = CURRENCY_SYMBOLS[(code ?? '').toLowerCase()] ?? (code?.toUpperCase() ?? '') return `${sym}${(amount / 100).toFixed(0)}` } export default function RoomsSection() { const { products: rooms, isLoading } = useMedusaProducts(6) return (

Six exclusive suites

Suites designed for the bush

Each suite tells a story — Zulu beadwork, private decks, freestanding baths overlooking the acacia plain.

{isLoading ? (

Loading suites...

) : (
{rooms && rooms.length > 0 ? rooms.map((room: any) => { const price = room.variants?.[0]?.prices?.[0] const imageUrl = room.thumbnail || 'https://images.pexels.com/photos/8849246/pexels-photo-8849246.jpeg?auto=compress&cs=tinysrgb&h=350' return (
{room.title
{room.title || 'Bush Suite'} {price && ( {formatPrice(price.amount, price.currency_code)} / night )}

{room.description || 'Enjoy panoramic views, en-suite bathroom with outdoor shower, and a private deck.'}

) }) : (

No suites available at the moment. Please check back soon.

)}
)}
) }