import { useState } from 'react' import { useMutation } from '@tanstack/react-query' import { useToast } 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 { api } from '@/lib/api' const Contact = () => { const { toast } = useToast() const [formState, setFormState] = useState({ company: '', name: '', email: '', phone: '', zip: '', message: '', service_interest: '', }) const mutation = useMutation({ mutationFn: (data) => api.post('/leads', data), onSuccess: () => { toast.success('Thanks! We\'ll be in touch shortly.') setFormState({ company: '', name: '', email: '', phone: '', zip: '', message: '', service_interest: '', }) }, onError: (error) => { toast.error(error.message || 'Failed to submit form. Please try again.') }, }) const handleSubmit = (e) => { e.preventDefault() mutation.mutate(formState) } const handleChange = (e) => { const { name, value } = e.target setFormState(prev => ({ ...prev, [name]: value })) } return (
Have questions about our services? We're here to help. Fill out the form and we'll get back to you shortly.
Our team of communications and infrastructure experts is ready to help you find the right solution for your business needs.
Monday - Friday: 8:00 AM - 6:00 PM CT
info@queuenorth.com