6 Commits

Author SHA1 Message Date
3b5ab43d06 Update src/app/page.tsx 2026-03-17 23:22:43 +00:00
151cbade9a Merge version_1 into main
Merge version_1 into main
2026-03-17 23:19:01 +00:00
c3feb46a2c Merge version_1 into main
Merge version_1 into main
2026-03-17 23:17:49 +00:00
cbc0432670 Merge version_1 into main
Merge version_1 into main
2026-03-17 23:17:24 +00:00
1e81688987 Merge version_1 into main
Merge version_1 into main
2026-03-17 23:16:57 +00:00
fbbdb5e0a3 Merge version_1 into main
Merge version_1 into main
2026-03-17 23:16:40 +00:00

View File

@@ -11,8 +11,29 @@ import FaqSplitText from "@/components/sections/faq/FaqSplitText";
import ContactCenter from "@/components/sections/contact/ContactCenter";
import FooterBaseReveal from "@/components/sections/footer/FooterBaseReveal";
import { Award, CheckCircle, Cog, Droplets, Gauge, Phone, Rotate3D, Shield, TrendingUp, Wrench, Zap } from "lucide-react";
import { useState } from "react";
export default function LandingPage() {
const [isModalOpen, setIsModalOpen] = useState(false);
const [phoneNumber, setPhoneNumber] = useState("");
const [serviceDescription, setServiceDescription] = useState("");
const handleOpenModal = () => {
setIsModalOpen(true);
};
const handleCloseModal = () => {
setIsModalOpen(false);
setPhoneNumber("");
setServiceDescription("");
};
const handleSubmit = (e: React.FormEvent) => {
e.preventDefault();
console.log("Form submitted:", { phoneNumber, serviceDescription });
handleCloseModal();
};
return (
<ThemeProvider
defaultButtonVariant="hover-magnetic"
@@ -36,7 +57,7 @@ export default function LandingPage() {
{ name: "FAQ", id: "faq" }
]}
button={{
text: "Book Service", href: "#contact"
text: "Book Service", onClick: handleOpenModal
}}
/>
</div>
@@ -50,7 +71,7 @@ export default function LandingPage() {
tagAnimation="slide-up"
background={{ variant: "radial-gradient" }}
buttons={[
{ text: "Book Service Now", href: "#contact" },
{ text: "Book Service Now", onClick: handleOpenModal },
{ text: "Learn More", href: "#services" }
]}
buttonAnimation="slide-up"
@@ -115,7 +136,7 @@ export default function LandingPage() {
animationType="slide-up"
textboxLayout="default"
useInvertedBackground={false}
buttons={[{ text: "Schedule Your Service", href: "#contact" }]}
buttons={[{ text: "Schedule Your Service", onClick: handleOpenModal }]}
buttonAnimation="slide-up"
/>
</div>
@@ -186,7 +207,7 @@ export default function LandingPage() {
<FaqSplitText
sideTitle="Frequently Asked Questions"
sideDescription="Got questions about our services? We've got answers. Contact us directly if you don't find what you need."
buttons={[{ text: "Contact Us", href: "#contact" }]}
buttons={[{ text: "Contact Us", onClick: handleOpenModal }]}
buttonAnimation="slide-up"
faqsAnimation="slide-up"
textPosition="left"
@@ -257,6 +278,84 @@ export default function LandingPage() {
copyrightText="© 2024 Dallas Automotive. All rights reserved."
/>
</div>
{/* Service Booking Modal */}
{isModalOpen && (
<div
className="fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4"
onClick={handleCloseModal}
>
<div
className="bg-white rounded-lg shadow-lg p-6 w-full max-w-md"
onClick={(e) => e.stopPropagation()}
>
<div className="flex justify-between items-center mb-4">
<h2 className="text-2xl font-bold text-foreground">Book Service</h2>
<button
onClick={handleCloseModal}
className="text-gray-500 hover:text-gray-700 text-2xl"
aria-label="Close modal"
>
×
</button>
</div>
<form onSubmit={handleSubmit} className="space-y-4">
<div>
<label
htmlFor="phone"
className="block text-sm font-medium text-foreground mb-1"
>
Phone Number
</label>
<input
id="phone"
type="tel"
placeholder="(555) 123-4567"
value={phoneNumber}
onChange={(e) => setPhoneNumber(e.target.value)}
required
className="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary-cta text-foreground"
/>
</div>
<div>
<label
htmlFor="description"
className="block text-sm font-medium text-foreground mb-1"
>
Service Description
</label>
<textarea
id="description"
placeholder="Tell us what service you need..."
value={serviceDescription}
onChange={(e) => setServiceDescription(e.target.value)}
required
rows={4}
className="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary-cta text-foreground"
/>
</div>
<div className="flex gap-3 pt-4">
<button
type="button"
onClick={handleCloseModal}
className="flex-1 px-4 py-2 border border-gray-300 text-foreground rounded-md hover:bg-gray-50 font-medium transition"
>
Cancel
</button>
<button
type="submit"
className="flex-1 px-4 py-2 bg-primary-cta text-white rounded-md hover:opacity-90 font-medium transition"
>
Submit
</button>
</div>
</form>
</div>
</div>
)}
</ThemeProvider>
);
}