"use client"; import React, { useState } from 'react'; import axios from 'axios'; const ChainLinkQuote = () => { const [formData, setFormData] = useState({ company: '', name: '', phone: '', email: '', material: '', city: '', footage: '' }); const [status, setStatus] = useState<"idle" | "submitting" | "success" | "error">("idle"); const handleChange = (e: React.ChangeEvent) => { const { name, value } = e.target; setFormData(prev => ({ ...prev, [name]: value })); }; const handleSubmit = async (e: React.FormEvent) => { e.preventDefault(); setStatus("submitting"); const emailData = { name: formData.name, email: formData.email, phone: formData.phone, service: formData.material || "Chain Link Quote", message: ` Company: ${formData.company}
Material Needed: ${formData.material}
Job Site City: ${formData.city}
Linear Footage: ${formData.footage} `, to: "info@vgfenceproducts.com", senderName: "VG Fence Chain Link Page", }; try { await axios.post("https://mailserver.metatronnest.com/send", emailData, { headers: { "Content-Type": "application/json" }, }); setStatus("success"); setFormData({ company: '', name: '', phone: '', email: '', material: '', city: '', footage: '' }); } catch (error) { console.error("❌ Error sending chain link quote request:", error); setStatus("error"); } }; return (

Get chain link fence materials pricing.

Fill in the quick form and we'll come back to you with contractor pricing within 2 business hours. Bulk orders welcome — we supply fence contractors, builders, and property managers across Ontario.

{status === "success" ? (

Quote Request Sent!

Thank you. We'll respond within 2 business hours.

) : (
Request a quote
Response within 2 business hours
{status === "error" &&

⚠️ Error sending request. Please try again.

}
)}
); }; export default ChainLinkQuote;