import { Helmet } from 'react-helmet-async' import { useState } from 'react' import { toast } from 'sonner' import { Button } from '@/components/ui/Button' import { Input } from '@/components/ui/Input' import { Textarea } from '@/components/ui/Textarea' import { Select } from '@/components/ui/Select' import { submitLead } from '@/lib/api' import { useDebounce } from '@/hooks/useDebounce' const Contact = () => { const [formState, setFormState] = useState({ company: '', name: '', email: '', phone: '', zip: '', message: '', service_interest: '', company_website: '', }) const [errors, setErrors] = useState({ company: '', name: '', email: '', message: '', }) const debouncedErrors = useDebounce(errors, 300) const [isSubmitting, setIsSubmitting] = useState(false) const validateForm = () => { const newErrors = { company: '', name: '', email: '', message: '' } if (!formState.company.trim()) newErrors.company = 'Company name is required' if (!formState.name.trim()) newErrors.name = 'Name is required' if (!formState.message.trim()) newErrors.message = 'Message is required' const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/ if (!formState.email.trim()) { newErrors.email = 'Email is required' } else if (!emailRegex.test(formState.email)) { newErrors.email = 'Please enter a valid email address' } const hasErrors = Object.values(newErrors).some(error => error !== '') setErrors(newErrors) if (hasErrors) { toast.error('Please fix the errors in the form') return false } return true } const handleSubmit = (e) => { e.preventDefault() if (!validateForm()) return handleSubmitForm() } const handleSubmitForm = async () => { setIsSubmitting(true) try { await submitLead(formState) toast.success("Thanks! We'll be in touch shortly.") setFormState({ company: '', name: '', email: '', phone: '', zip: '', message: '', service_interest: '' }) setErrors({ company: '', name: '', email: '', message: '' }) } catch (error) { if (error.response?.status === 409) { toast.success("We already have your submission! We'll be in touch.") } else { toast.error(error.message || 'Failed to submit form. Please try again.') } } finally { setIsSubmitting(false) } } const handleChange = (e) => { const { name, value } = e.target setFormState(prev => ({ ...prev, [name]: value })) if (errors[name]) setErrors(prev => ({ ...prev, [name]: '' })) } const contactDetails = [ { label: 'Phone', icon: ( ), content: (
(321) 730-8020 (888) 656-2850 Toll-Free
), }, { label: 'Office', icon: ( ), content: ( 7901 4th St N St. Petersburg, FL 33702 ), }, { label: 'Hours', icon: ( ), content:

Mon – Fri: 8:00 AM – 6:00 PM CT

, }, ] const trustPoints = [ '8x8 Certified Partner with proven expertise', 'Veteran-owned — 25+ years of experience', 'SMB to Enterprise solutions', 'No vendor bias — we recommend what fits', ] return ( <> Contact Queue North | Schedule a Consultation {/* Hero */}

Let's Talk

Tell us about your business and we'll cut through the noise to find what actually works for you.

{/* Contact Body */}
{/* Left: Info panel — order 2 on mobile so form appears first */}
{contactDetails.map((item) => (
{item.icon}

{item.label}

{item.content}
))}

Why Queue North

    {trustPoints.map((point, i) => (
  • {point}
  • ))}
{/* Right: Form panel — order 1 on mobile so it appears first */}

Send Us a Message

We typically respond within one business day.

{/* Company */}
{debouncedErrors.company &&

{debouncedErrors.company}

}
{/* Name + Email */}
{debouncedErrors.name &&

{debouncedErrors.name}

}
{debouncedErrors.email &&

{debouncedErrors.email}

}
{/* Phone + Service Interest */}
{/* Message */}