import { useState, useEffect } from 'react' import Navbar from '../components/Navbar' import Footer from '../components/Footer' import { API_BASE, type Category } from '../types' type FormState = { name: string; email: string; subject: string; message: string } type Status = 'idle' | 'sending' | 'sent' | 'error' const SUBJECTS = ['Product Inquiry', 'Order Support', 'Custom Blending', 'Wholesale', 'Partnership', 'Other'] export default function ContactPage() { const [categories, setCategories] = useState([]) const [form, setForm] = useState({ name: '', email: '', subject: '', message: '' }) const [status, setStatus] = useState('idle') useEffect(() => { fetch(`${API_BASE}/categories`).then(r => r.json()).then(setCategories).catch(console.error) }, []) const handleChange = (e: React.ChangeEvent) => { setForm(prev => ({ ...prev, [e.target.name]: e.target.value })) } const handleSubmit = async (e: React.FormEvent) => { e.preventDefault() setStatus('sending') // Simulate API call (replace with real endpoint later) await new Promise(r => setTimeout(r, 1500)) setStatus('sent') setForm({ name: '', email: '', subject: '', message: '' }) } return (
{/* Header */}

Get in Touch

Contact Us

Have a question, custom request, or partnership idea? We'd love to hear from you.

{/* Contact Info */}

Reach Us Directly

{[ { icon: 'πŸ“§', label: 'Email', value: 'hello@homaroma.shop', href: 'mailto:hello@homaroma.shop' }, { icon: 'πŸ“±', label: 'LINE Official', value: '@homaroma', href: '#' }, { icon: 'πŸ“Έ', label: 'Instagram', value: '@homaroma', href: '#' }, { icon: 'πŸ“', label: 'Studio', value: 'Bangkok, Thailand', href: '#' }, ].map(item => (
{item.icon}

{item.label}

{item.value}

))}

Response Time

Email ~2 hours
LINE ~30 minutes
Instagram DM ~4 hours

Mon–Sat, 9:00–18:00 (ICT)

{/* Contact Form */}
{status === 'sent' ? (
βœ‰οΈ

Message Sent!

Thank you for reaching out. We'll get back to you within 2 hours.

) : (