Add src/app/contact/page.tsx
This commit is contained in:
246
src/app/contact/page.tsx
Normal file
246
src/app/contact/page.tsx
Normal file
@@ -0,0 +1,246 @@
|
||||
"use client";
|
||||
|
||||
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, Mail } from "lucide-react";
|
||||
import { useState } from "react";
|
||||
|
||||
export default function ContactPage() {
|
||||
const [formData, setFormData] = useState({
|
||||
name: "", email: "", subject: "", message: ""});
|
||||
const [submitted, setSubmitted] = useState(false);
|
||||
|
||||
const handleInputChange = (
|
||||
e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>
|
||||
) => {
|
||||
const { name, value } = e.target;
|
||||
setFormData((prev) => ({
|
||||
...prev,
|
||||
[name]: value,
|
||||
}));
|
||||
};
|
||||
|
||||
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
// Here you would typically send the form data to a backend
|
||||
console.log("Form submitted:", formData);
|
||||
setSubmitted(true);
|
||||
setTimeout(() => {
|
||||
setFormData({ name: "", email: "", subject: "", message: "" });
|
||||
setSubmitted(false);
|
||||
}, 3000);
|
||||
};
|
||||
|
||||
return (
|
||||
<ThemeProvider
|
||||
defaultButtonVariant="icon-arrow"
|
||||
defaultTextAnimation="entrance-slide"
|
||||
borderRadius="rounded"
|
||||
contentWidth="compact"
|
||||
sizing="mediumLargeSizeMediumTitles"
|
||||
background="noise"
|
||||
cardStyle="inset"
|
||||
primaryButtonStyle="double-inset"
|
||||
secondaryButtonStyle="solid"
|
||||
headingFontWeight="bold"
|
||||
>
|
||||
<div id="nav" data-section="nav">
|
||||
<NavbarLayoutFloatingInline
|
||||
brandName="AirPods"
|
||||
navItems={[
|
||||
{ name: "Products", id: "products" },
|
||||
{ name: "Features", id: "features" },
|
||||
{ name: "Why AirPods", id: "metrics" },
|
||||
{ name: "Support", id: "faq" },
|
||||
{ name: "Pricing", id: "pricing" },
|
||||
{ name: "Contact", id: "contact" },
|
||||
]}
|
||||
button={{ text: "Shop Now", href: "/" }}
|
||||
animateOnLoad={true}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<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 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 htmlFor="subject" className="block text-sm font-medium mb-2">Subject</label>
|
||||
<input
|
||||
type="text"
|
||||
id="subject"
|
||||
name="subject"
|
||||
value={formData.subject}
|
||||
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 htmlFor="message" className="block text-sm font-medium mb-2">Message</label>
|
||||
<textarea
|
||||
id="message"
|
||||
name="message"
|
||||
value={formData.message}
|
||||
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 md:w-auto px-6 py-2 rounded-lg bg-primary-cta text-white font-medium hover:bg-primary-cta/90 transition"
|
||||
>
|
||||
{submitted ? "Message Sent!" : "Send Message"}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="faq" data-section="faq">
|
||||
<ContactFaq
|
||||
faqs={[
|
||||
{
|
||||
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: "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: "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: "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: "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: "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="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"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div id="footer" data-section="footer">
|
||||
<FooterSimple
|
||||
columns={[
|
||||
{
|
||||
title: "Products", items: [
|
||||
{ label: "AirPods Pro", href: "/" },
|
||||
{ label: "AirPods Max", href: "/" },
|
||||
{ label: "AirPods (2nd Gen)", href: "/" },
|
||||
{ label: "Compare Models", href: "#" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Support", items: [
|
||||
{ label: "FAQ", href: "/" },
|
||||
{ label: "Setup Guide", href: "#" },
|
||||
{ label: "Troubleshooting", href: "#" },
|
||||
{ label: "Contact Us", href: "/contact" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Company", items: [
|
||||
{ label: "About Us", href: "#" },
|
||||
{ label: "Blog", href: "#" },
|
||||
{ label: "Careers", href: "#" },
|
||||
{ label: "News", href: "#" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Legal", items: [
|
||||
{ label: "Privacy Policy", href: "#" },
|
||||
{ label: "Terms of Service", href: "#" },
|
||||
{ label: "Cookie Policy", href: "#" },
|
||||
{ label: "Warranty", href: "#" },
|
||||
],
|
||||
},
|
||||
]}
|
||||
bottomLeftText="© 2025 AirPods. All rights reserved."
|
||||
bottomRightText="Powered by Premium Audio Technology"
|
||||
/>
|
||||
</div>
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user