import React, { useState, useRef, useEffect } from 'react'; import { Camera, ShieldCheck, Sun, Wind, Droplets, Sparkles, CheckCircle2, Clock, FileText, Upload, User, Mail, Phone, MapPin, ChevronRight, ChevronDown, Image as ImageIcon } from 'lucide-react'; const App = () => { const formRef = useRef(null); const fileInputRef = useRef(null); const [formData, setFormData] = useState({ firstName: '', lastName: '', email: '', phone: '', zipCode: '', furnitureType: 'Both', lastCleaned: '', workingWithDesigner: false }); const [files, setFiles] = useState([]); const [submitted, setSubmitted] = useState(false); const [loading, setLoading] = useState(false); const scrollToForm = () => { formRef.current?.scrollIntoView({ behavior: 'smooth' }); }; const handleInputChange = (e) => { const { name, value, type, checked } = e.target; setFormData(prev => ({ ...prev, [name]: type === 'checkbox' ? checked : value })); }; const handleFileChange = (e) => { const selectedFiles = Array.from(e.target.files); setFiles(selectedFiles); }; const handleSubmit = async (e) => { e.preventDefault(); setLoading(true); // Prepare Multipart Data for Hostinger PHP const data = new FormData(); data.append('firstName', formData.firstName); data.append('lastName', formData.lastName); data.append('email', formData.email); data.append('phone', formData.phone); data.append('zipCode', formData.zipCode); data.append('furnitureType', formData.furnitureType); files.forEach((file) => { data.append('photos[]', file); }); try { const response = await fetch('save_lead.php', { method: 'POST', body: data }); const responseText = await response.text(); try { const result = JSON.parse(responseText); if (result.status === 'success') { // Track the Lead event in Meta Ads if pixel is present if (window.fbq) window.fbq('track', 'Lead'); setSubmitted(true); } else { throw new Error(result.message || "Failed to save lead"); } } catch (parseError) { // Log raw response if server sends HTML error instead of JSON console.error("Server Raw Response:", responseText); throw new Error("Server returned an invalid response. Please check your save_lead.php credentials."); } } catch (err) { console.error("Submission error:", err); alert("Submission error: " + err.message); } finally { setLoading(false); } }; const CTAButton = ({ className = "" }) => ( ); return (
Upload a few photos of your indoor or outdoor furniture and receive a personalized Protection Plan — including whether cleaning is required first.
Indoor • Outdoor • Patio • Poolside • White Upholstery
{item.desc}
Older silicone-based "stain guards" break down fast and actually attract oils/dirt over time.
Protection applied over dirty fabric fails to bond and traps bacteria inside pieces.
Protection without specific UV defense won't last a single Texas summer season.
Simple 2-minute process. No obligation assessment.
One of our fabric specialists is reviewing your photos. Check your inbox within 24 hours.