Update src/app/contact/page.tsx

This commit is contained in:
2026-03-07 11:58:53 +00:00
parent 452a61b0a9
commit 4822975f65

View File

@@ -4,22 +4,33 @@ import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarLayoutFloatingInline from "@/components/navbar/NavbarLayoutFloatingInline";
import ContactFaq from "@/components/sections/contact/ContactFaq";
import FooterSimple from "@/components/sections/footer/FooterSimple";
import { Phone } from "lucide-react";
import { Phone, Mail } from "lucide-react";
import { useState } from "react";
import Input from "@/components/form/Input";
export default function ContactPage() {
const [formData, setFormData] = useState({
name: "", email: "", subject: "", message: ""});
const [submitted, setSubmitted] = useState(false);
const handleChange = (field: string, value: string) => {
setFormData((prev) => ({ ...prev, [field]: value }));
const handleInputChange = (
e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>
) => {
const { name, value } = e.target;
setFormData((prev) => ({
...prev,
[name]: value,
}));
};
const handleSubmit = (e: React.FormEvent) => {
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
e.preventDefault();
// Here you would typically send the form data to a backend
console.log("Form submitted:", formData);
setFormData({ name: "", email: "", subject: "", message: "" });
setSubmitted(true);
setTimeout(() => {
setFormData({ name: "", email: "", subject: "", message: "" });
setSubmitted(false);
}, 3000);
};
return (
@@ -43,152 +54,147 @@ export default function ContactPage() {
{ name: "Features", id: "features" },
{ name: "Why AirPods", id: "metrics" },
{ name: "Support", id: "faq" },
{ name: "Pricing", id: "/pricing" },
{ name: "Contact", id: "/contact" },
{ name: "Pricing", id: "pricing" },
{ name: "Contact", id: "contact" },
]}
button={{ text: "Shop Now", href: "/" }}
animateOnLoad={true}
/>
</div>
<div id="contact-section" data-section="contact-section" className="min-h-screen pt-24 px-4">
<div className="max-w-7xl mx-auto">
<div className="grid grid-cols-1 md:grid-cols-2 gap-12 mb-16">
{/* Contact Form */}
<div className="bg-card rounded-2xl p-8">
<h2 className="text-3xl font-bold mb-2">Get in Touch</h2>
<p className="text-foreground/60 mb-8">We'd love to hear from you. Send us a message and we'll respond as soon as possible.</p>
<div id="contact" data-section="contact" className="py-20">
<div className="w-content-width mx-auto">
<div className="space-y-8">
{/* Contact Information Section */}
<div className="grid grid-cols-1 md:grid-cols-3 gap-8 mb-16">
<div className="rounded-lg border border-accent/20 p-8">
<div className="flex items-center gap-4 mb-4">
<div className="w-12 h-12 rounded-lg bg-primary-cta/10 flex items-center justify-center">
<Phone className="w-6 h-6 text-primary-cta" />
</div>
<h3 className="text-lg font-semibold">Call Us</h3>
</div>
<p className="text-foreground/80">+1 (800) 275-2273</p>
<p className="text-sm text-foreground/60 mt-2">Available Monday to Friday, 9AM to 6PM EST</p>
</div>
<div className="rounded-lg border border-accent/20 p-8">
<div className="flex items-center gap-4 mb-4">
<div className="w-12 h-12 rounded-lg bg-primary-cta/10 flex items-center justify-center">
<Mail className="w-6 h-6 text-primary-cta" />
</div>
<h3 className="text-lg font-semibold">Email Us</h3>
</div>
<p className="text-foreground/80">support@airpods.com</p>
<p className="text-sm text-foreground/60 mt-2">We'll get back to you within 24 hours</p>
</div>
<div className="rounded-lg border border-accent/20 p-8">
<div className="flex items-center gap-4 mb-4">
<div className="w-12 h-12 rounded-lg bg-primary-cta/10 flex items-center justify-center">
<Phone className="w-6 h-6 text-primary-cta" />
</div>
<h3 className="text-lg font-semibold">Live Chat</h3>
</div>
<p className="text-foreground/80">Chat with our support team</p>
<p className="text-sm text-foreground/60 mt-2">Available 24/7 for immediate assistance</p>
</div>
</div>
{/* Contact Form Section */}
<div className="rounded-lg border border-accent/20 p-8 md:p-12">
<h2 className="text-3xl font-bold mb-2">Send us a Message</h2>
<p className="text-foreground/70 mb-8">Have a question or feedback? Fill out the form below and we'll get back to you as soon as possible.</p>
<form onSubmit={handleSubmit} className="space-y-6">
<div>
<label className="block text-sm font-medium mb-2">Name</label>
<Input
value={formData.name}
onChange={(value) => handleChange("name", value)}
placeholder="Your name"
required
/>
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
<div>
<label htmlFor="name" className="block text-sm font-medium mb-2">Name</label>
<input
type="text"
id="name"
name="name"
value={formData.name}
onChange={handleInputChange}
required
placeholder="Your name"
className="w-full px-4 py-2 rounded-lg bg-secondary-cta/50 border border-accent/20 focus:outline-none focus:border-primary-cta"
/>
</div>
<div>
<label htmlFor="email" className="block text-sm font-medium mb-2">Email</label>
<input
type="email"
id="email"
name="email"
value={formData.email}
onChange={handleInputChange}
required
placeholder="your@email.com"
className="w-full px-4 py-2 rounded-lg bg-secondary-cta/50 border border-accent/20 focus:outline-none focus:border-primary-cta"
/>
</div>
</div>
<div>
<label className="block text-sm font-medium mb-2">Email</label>
<Input
value={formData.email}
onChange={(value) => handleChange("email", value)}
type="email"
placeholder="your@email.com"
required
/>
</div>
<div>
<label className="block text-sm font-medium mb-2">Subject</label>
<Input
<label htmlFor="subject" className="block text-sm font-medium mb-2">Subject</label>
<input
type="text"
id="subject"
name="subject"
value={formData.subject}
onChange={(value) => handleChange("subject", value)}
placeholder="How can we help?"
onChange={handleInputChange}
required
placeholder="How can we help?"
className="w-full px-4 py-2 rounded-lg bg-secondary-cta/50 border border-accent/20 focus:outline-none focus:border-primary-cta"
/>
</div>
<div>
<label className="block text-sm font-medium mb-2">Message</label>
<label htmlFor="message" className="block text-sm font-medium mb-2">Message</label>
<textarea
id="message"
name="message"
value={formData.message}
onChange={(e) => handleChange("message", e.target.value)}
placeholder="Tell us more..."
className="w-full px-4 py-3 bg-secondary-cta text-foreground placeholder:text-foreground/75 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-cta min-h-32"
onChange={handleInputChange}
required
placeholder="Tell us more..."
rows={6}
className="w-full px-4 py-2 rounded-lg bg-secondary-cta/50 border border-accent/20 focus:outline-none focus:border-primary-cta resize-none"
/>
</div>
<button
type="submit"
className="w-full bg-primary-cta text-background font-semibold py-3 rounded-lg hover:opacity-90 transition-opacity"
className="w-full md:w-auto px-6 py-2 rounded-lg bg-primary-cta text-white font-medium hover:bg-primary-cta/90 transition"
>
Send Message
{submitted ? "Message Sent!" : "Send Message"}
</button>
</form>
</div>
{/* Company Information */}
<div className="space-y-8">
<div className="bg-card rounded-2xl p-8">
<h3 className="text-2xl font-bold mb-4">Contact Information</h3>
<div className="space-y-6">
<div>
<h4 className="font-semibold mb-2">Email</h4>
<p className="text-foreground/60">support@airpods.com</p>
<p className="text-foreground/60">sales@airpods.com</p>
</div>
<div>
<h4 className="font-semibold mb-2">Phone</h4>
<p className="text-foreground/60">+1 (800) 275-2273</p>
</div>
<div>
<h4 className="font-semibold mb-2">Address</h4>
<p className="text-foreground/60">One Apple Park Way</p>
<p className="text-foreground/60">Cupertino, CA 95014</p>
<p className="text-foreground/60">United States</p>
</div>
<div>
<h4 className="font-semibold mb-2">Business Hours</h4>
<p className="text-foreground/60">Monday - Friday: 9:00 AM - 6:00 PM PT</p>
<p className="text-foreground/60">Saturday: 10:00 AM - 4:00 PM PT</p>
<p className="text-foreground/60">Sunday: Closed</p>
</div>
</div>
</div>
<div className="bg-card rounded-2xl p-8">
<h3 className="text-2xl font-bold mb-4">Support Options</h3>
<ul className="space-y-3 text-foreground/60">
<li className="flex items-start gap-3">
<span className="text-primary-cta mt-1"></span>
<span>Live chat support available 24/7</span>
</li>
<li className="flex items-start gap-3">
<span className="text-primary-cta mt-1"></span>
<span>Technical support for setup and troubleshooting</span>
</li>
<li className="flex items-start gap-3">
<span className="text-primary-cta mt-1"></span>
<span>Warranty and replacement assistance</span>
</li>
<li className="flex items-start gap-3">
<span className="text-primary-cta mt-1"></span>
<span>Sales inquiries for bulk orders</span>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div id="contact-faq" data-section="contact-faq">
<div id="faq" data-section="faq">
<ContactFaq
faqs={[
{
id: "1", title: "What is your typical response time?", content: "We aim to respond to all inquiries within 24 hours during business days. For urgent matters, please call our support line at +1 (800) 275-2273."},
id: "1", title: "What's the best way to contact support?", content: "You can reach our support team via phone at +1 (800) 275-2273, email at support@airpods.com, or through our 24/7 live chat. Choose whichever method is most convenient for you."},
{
id: "2", title: "Do you offer technical support?", content: "Yes, we provide comprehensive technical support for setup, troubleshooting, and connectivity issues. Contact our support team via email or phone, and we'll help you get the most out of your AirPods."},
id: "2", title: "How long does it take to get a response?", content: "Phone and live chat support is available 24/7. For email inquiries, we typically respond within 24 hours during business days. We prioritize urgent matters and aim to resolve issues as quickly as possible."},
{
id: "3", title: "What is your return policy?", content: "We offer a 30-day return policy for all products purchased through our official store. Items must be in original condition with all accessories included. Contact our sales team for more details."},
id: "3", title: "Do you offer technical support for troubleshooting?", content: "Yes, our support team is trained to help with any technical issues you may encounter with your AirPods. We can help with connectivity, audio quality, battery life, and general troubleshooting."},
{
id: "4", title: "Do you offer bulk purchase discounts?", content: "Yes, we provide special pricing for bulk orders and corporate purchases. Please reach out to our sales team at sales@airpods.com with your requirements."},
id: "4", title: "What's your return and warranty policy?", content: "We offer a 30-day return policy on all products. Additionally, all AirPods come with a one-year limited warranty covering manufacturing defects. Extended coverage options are also available."},
{
id: "5", title: "How can I track my order?", content: "After placing an order, you'll receive a tracking number via email. You can use this number to monitor your shipment status on our website or the carrier's tracking page."},
id: "5", title: "Can I schedule a call with a specialist?", content: "Absolutely! You can schedule a call with one of our audio specialists through our website or by calling our main support line. We can provide personalized recommendations based on your needs."},
{
id: "6", title: "What payment methods do you accept?", content: "We accept all major credit cards (Visa, Mastercard, American Express), PayPal, Apple Pay, and other digital payment methods for your convenience."},
id: "6", title: "Do you ship internationally?", content: "Yes, we ship to most countries worldwide. Shipping times and costs vary by location. Visit our shipping policy page for more details, or contact support for specific questions about your region."},
]}
ctaTitle="Ready to Upgrade?"
ctaDescription="Get help from our expert team"
ctaButton={{ text: "Call Us Now", href: "tel:+18002752273" }}
ctaTitle="Still have questions?"
ctaDescription="Let's get started with a quick consultation to find the perfect solution for your audio needs."
ctaButton={{ text: "Schedule a Call", href: "#" }}
ctaIcon={Phone}
useInvertedBackground={false}
animationType="slide-up"
@@ -203,7 +209,7 @@ export default function ContactPage() {
{ label: "AirPods Pro", href: "/" },
{ label: "AirPods Max", href: "/" },
{ label: "AirPods (2nd Gen)", href: "/" },
{ label: "Compare Models", href: "/pricing" },
{ label: "Compare Models", href: "#" },
],
},
{