diff --git a/src/components/sections/ThemedRegalSuitesSection.tsx b/src/components/sections/ThemedRegalSuitesSection.tsx new file mode 100644 index 0000000..1905c24 --- /dev/null +++ b/src/components/sections/ThemedRegalSuitesSection.tsx @@ -0,0 +1,84 @@ +'use client' +import { useMedusaProducts } from '@/hooks/useMedusaProducts' +import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from '@/components/ui/Card' +import Button from '@/components/ui/Button' +import Link from 'next/link' +import Image from 'next/image' +import { BedDouble, Snowflake, Tv, Wifi } from 'lucide-react' + +export default function ThemedRegalSuitesSection() { + const { products: rooms, isLoading, error } = useMedusaProducts(6) + + if (isLoading) { + return ( +
+
+

Loading our royal suites...

+
+
+ ) + } + + if (error || !rooms) { + return ( +
+
+

Unable to load suites. Please try again later.

+
+
+ ) + } + + const formatPrice = (amount: number, code?: string) => { + const sym = 'R' + return `${sym}${(amount / 100).toFixed(2)}` + } + + return ( +
+
+
+

Themed Regal Suites

+

+ Each of our six individually themed, fully air-conditioned luxury suites offers en-suite bathroom, TV with DStv, and a private sanctuary feel. Choose the room that speaks to your soul. +

+
+
+ {rooms.map((room) => { + const price = room.variants?.[0]?.prices?.[0] + return ( + +
+ {room.thumbnail ? ( + {room.title} + ) : ( +
+ +
+ )} +
+ + {room.title} + {room.description} + + + Air-conditioned + DStv + Wi-Fi + + + {price && ( + {formatPrice(price.amount, price.currency_code)} + )} + + + + +
+ ) + })} +
+
+
+ ) +} \ No newline at end of file