diff --git a/src/components/sections/VisitTheWokContactSection.tsx b/src/components/sections/VisitTheWokContactSection.tsx new file mode 100644 index 0000000..236d482 --- /dev/null +++ b/src/components/sections/VisitTheWokContactSection.tsx @@ -0,0 +1,185 @@ +'use client' + +import { useState } from 'react' +import Link from 'next/link' +import { ArrowRight, Clock, MapPin } from 'lucide-react' +import Button from '@/components/ui/Button' +import Input from '@/components/ui/Input' +import BusinessContact from '@/components/BusinessContact' +import BusinessHours from '@/components/BusinessHours' +import BusinessMap from '@/components/BusinessMap' +import { useEnquiry } from '@/hooks/useEnquiry' + +export default function VisitTheWokContactSection() { + const enquiry = useEnquiry() + const [name, setName] = useState('') + const [phone, setPhone] = useState('') + const [email, setEmail] = useState('') + const [message, setMessage] = useState('') + const [formError, setFormError] = useState('') + const [sending, setSending] = useState(false) + const [result, setResult] = useState<{ ok: boolean; message: string } | null>(null) + + const sentOk = enquiry.available && result !== null && result.ok + const showForm = enquiry.available && !sentOk + + const handleSend = async (channel: 'whatsapp' | 'email') => { + setFormError('') + if (!name.trim() || !phone.trim()) { + setFormError('Add your name and a number we can reach you on, then send again.') + return + } + setSending(true) + const outcome = await enquiry.send({ name, phone, email, message }, channel) + setSending(false) + setResult(outcome) + } + + return ( +
+
+
+
+
+
+

+ Order on the way, collect it still steaming. +

+

+ The wok is on from early until the last box leaves the counter. Come past for a takeaway, or send your order through first and pick it up at the corner — no long wait, nothing sitting under a lamp. +

+ +
+ + + +
+ +
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+ +
+
+

Talk to the counter

+

+ A question about an order, a big box, or noodles for a whole class? +

+

+ Send it through. We answer between tosses. +

+ + {sentOk && result ? ( +

+ {result.message} +

+ ) : null} + + {showForm ? ( +
event.preventDefault()}> + {result && !result.ok ? ( +

+ {result.message} +

+ ) : null} + + setName(event.target.value)} + placeholder="The name we should ask for" + /> + setPhone(event.target.value)} + placeholder="A number we can reach you on" + /> + setEmail(event.target.value)} + placeholder="you@example.co.za" + /> + +
+ +