From b53b37e14dbac796a021544a0bc6a95056d4940d Mon Sep 17 00:00:00 2001 From: Vula Builder Date: Sat, 25 Jul 2026 11:17:59 +0000 Subject: [PATCH] Deploy --- .../sections/SereneSuitesSection.tsx | 98 +++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 src/components/sections/SereneSuitesSection.tsx diff --git a/src/components/sections/SereneSuitesSection.tsx b/src/components/sections/SereneSuitesSection.tsx new file mode 100644 index 0000000..2a33064 --- /dev/null +++ b/src/components/sections/SereneSuitesSection.tsx @@ -0,0 +1,98 @@ +'use client' + +import { useMedusaProducts } from "@/hooks/useMedusaProducts" +import Image from "next/image" +import Link from "next/link" + +export default function SereneSuitesSection() { + const { products: rooms, isLoading, error } = useMedusaProducts(6) + + const formatPrice = (amount: number, code?: string) => { + const symbols: Record = { + kes: "KSh", + usd: "$", + eur: "€", + gbp: "£", + zar: "R", + } + const sym = symbols[code?.toLowerCase() ?? ""] ?? (code?.toUpperCase() ?? "") + return `${sym}${(amount / 100).toFixed(2)}` + } + + if (isLoading) { + return ( +
+
+

Loading rooms…

+
+
+ ) + } + + if (error) { + return ( +
+
+

Unable to load rooms. Please try again later.

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

+ Suites That Sink You Into Stillness +

+

+ Every room at Masai Suites is designed as a haven — natural materials, + soft linens, and a quiet palette that lets the outside in. +

+
+ {rooms?.map((room: any) => { + const price = room.variants?.[0]?.prices?.[0] + return ( +
+
+ {room.thumbnail ? ( + {room.title} + ) : ( +
+ )} +
+
+

{room.title}

+

+ {room.description} +

+ {price && ( +

+ {formatPrice(price.amount, price.currency_code)}{" "} + per night +

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