From 0ec90c42934f4a50f14e882e2e62b82dcc4808eb Mon Sep 17 00:00:00 2001 From: Vula Builder Date: Sat, 25 Jul 2026 11:17:58 +0000 Subject: [PATCH] Deploy --- .../sections/FindUsAndConnectSection.tsx | 175 ++++++++++++++++++ 1 file changed, 175 insertions(+) create mode 100644 src/components/sections/FindUsAndConnectSection.tsx diff --git a/src/components/sections/FindUsAndConnectSection.tsx b/src/components/sections/FindUsAndConnectSection.tsx new file mode 100644 index 0000000..7865724 --- /dev/null +++ b/src/components/sections/FindUsAndConnectSection.tsx @@ -0,0 +1,175 @@ +'use client' + +import { useState } from "react" +import { Clock, Mail, MapPin, Phone } from 'lucide-react' +import Button from "@/components/ui/Button" +import Input from "@/components/ui/Input" +import { useEmDashContent } from "@/hooks/useEmDashContent" + +export default function FindUsAndConnectSection() { + const { items, loading } = useEmDashContent("business_hours") + const [name, setName] = useState("") + const [email, setEmail] = useState("") + const [message, setMessage] = useState("") + const [submitted, setSubmitted] = useState(false) + + if (loading) { + return ( +
+
+
+ ) + } + + if (items.length === 0) return null + + const handleSubmit = (e: React.FormEvent) => { + e.preventDefault() + setSubmitted(true) + setName("") + setEmail("") + setMessage("") + } + + return ( +
+
+ {/* Left: map placeholder + contact details + hours */} +
+

+ Find Us & Connect +

+
+
+ + Map Loaded Here +
+
+
+
+ +

+ Masai Suites, Nairobi, Kenya +

+
+
+ +

+254 712 345 678

+
+
+ +

info@masaisuites.com

+
+
+
+
+ +

+ Opening Hours +

+
+
    + {items.map((item) => { + const d = item.data as { + day_of_week?: string + open_time?: string + close_time?: string + is_closed?: boolean + note?: string + } + return ( +
  • + + {d.day_of_week} + + + {d.is_closed + ? "Closed" + : `${d.open_time ?? "—"} – ${d.close_time ?? "—"}`} + + {d.note && ( + + {d.note} + + )} +
  • + ) + })} +
+
+
+ + {/* Right: enquiry form */} +
+
+

+ Send Us a Message +

+ {submitted ? ( +
+

+ Thank you! We will get back to you soon. +

+
+ ) : ( +
+
+ + setName(e.target.value)} + placeholder="Your name" + required + /> +
+
+ + setEmail(e.target.value)} + placeholder="you@example.com" + required + /> +
+
+ +