function Contact() {
const [submitted, setSubmitted] = React.useState(false);
const [form, setForm] = React.useState({
name: '', company: '', email: '', phone: '',
category: PRODUCT_CATEGORIES[0].label,
quantity: '',
message: '',
});
const upd = (k) => (e) => setForm(f => ({ ...f, [k]: e.target.value }));
const submit = async (e) => {
e.preventDefault();
// Validate required fields
if (!form.name || !form.email) {
alert('Please fill out your name and email.');
return;
}
try {
const res = await fetch('contact.php', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(form)
});
const data = await res.json();
if (res.ok && data.success) {
setSubmitted(true);
} else {
alert(data.message || 'Failed to send enquiry. Please try again.');
}
} catch (err) {
console.error('Error submitting form:', err);
alert('Error connecting to server. Please try again later.');
}
};
return (
Request a quote, ask for a spec sheet, or send us a drawing. We supply domestically and internationally — our team typically responds within one business day.
Thank you — our team will get back to you within one business day. For urgent requests, WhatsApp us at {SSE_INFO.phone}.