|
|
|
|
@@ -10,55 +10,8 @@ import TestimonialCardFifteen from "@/components/sections/testimonial/Testimonia
|
|
|
|
|
import ContactSplit from "@/components/sections/contact/ContactSplit";
|
|
|
|
|
import FooterMedia from "@/components/sections/footer/FooterMedia";
|
|
|
|
|
import { Truck, CheckCircle, Shield, Award, Clock, Star, Phone } from "lucide-react";
|
|
|
|
|
import { useState } from "react";
|
|
|
|
|
|
|
|
|
|
export default function LandingPage() {
|
|
|
|
|
const [formData, setFormData] = useState({ email: "", name: "" });
|
|
|
|
|
const [submissionStatus, setSubmissionStatus] = useState<"idle" | "loading" | "success" | "error">("idle");
|
|
|
|
|
const [confirmationCode, setConfirmationCode] = useState<string | null>(null);
|
|
|
|
|
|
|
|
|
|
const generateConfirmationCode = (): string => {
|
|
|
|
|
return Math.floor(100000 + Math.random() * 900000).toString();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const handleQuoteSubmit = async (email: string) => {
|
|
|
|
|
setFormData(prev => ({ ...prev, email }));
|
|
|
|
|
setSubmissionStatus("loading");
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
const code = generateConfirmationCode();
|
|
|
|
|
setConfirmationCode(code);
|
|
|
|
|
|
|
|
|
|
// Extract first name from email if not already set
|
|
|
|
|
const firstName = formData.name || email.split("@")[0].split(".")[0];
|
|
|
|
|
|
|
|
|
|
const response = await fetch("https://formspree.io/f/xjkbygyp", {
|
|
|
|
|
method: "POST", headers: {
|
|
|
|
|
"Accept": "application/json", "Content-Type": "application/json"},
|
|
|
|
|
body: JSON.stringify({
|
|
|
|
|
email: email,
|
|
|
|
|
name: firstName,
|
|
|
|
|
message: `Quote Request from ${firstName}. Confirmation Code: ${code}`,
|
|
|
|
|
_subject: `MG Junk Removal Quote Request - ${code}`,
|
|
|
|
|
}),
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (response.ok) {
|
|
|
|
|
setSubmissionStatus("success");
|
|
|
|
|
// Reset form after 3 seconds
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
setFormData({ email: "", name: "" });
|
|
|
|
|
setSubmissionStatus("idle");
|
|
|
|
|
}, 3000);
|
|
|
|
|
} else {
|
|
|
|
|
setSubmissionStatus("error");
|
|
|
|
|
}
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.error("Form submission error:", error);
|
|
|
|
|
setSubmissionStatus("error");
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<ThemeProvider
|
|
|
|
|
defaultButtonVariant="bounce-effect"
|
|
|
|
|
@@ -105,13 +58,16 @@ export default function LandingPage() {
|
|
|
|
|
testimonials={[
|
|
|
|
|
{
|
|
|
|
|
name: "James Mitchell", handle: "Homeowner, Detroit MI", testimonial: "Fastest quote I've ever gotten. They showed up on time, worked efficiently, and left zero damage.", rating: 5,
|
|
|
|
|
imageSrc: "http://img.b2bpic.net/free-photo/closeup-handsome-young-office-worker-glasses-suit-smiling-camera-looking-happy-white_1258-173667.jpg"},
|
|
|
|
|
imageSrc: "http://img.b2bpic.net/free-photo/closeup-handsome-young-office-worker-glasses-suit-smiling-camera-looking-happy-white_1258-173667.jpg"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "Sarah Chen", handle: "Property Manager, Chicago IL", testimonial: "Professional team. Bilingual support. Firm pricing. Exactly what we needed for our commercial properties.", rating: 5,
|
|
|
|
|
imageSrc: "http://img.b2bpic.net/free-photo/young-attractive-businesswoman_93675-133773.jpg"},
|
|
|
|
|
imageSrc: "http://img.b2bpic.net/free-photo/young-attractive-businesswoman_93675-133773.jpg"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "Marcus Johnson", handle: "Contractor, Atlanta GA", testimonial: "Same-day availability for construction debris. Reliable, fast, and reasonably priced.", rating: 5,
|
|
|
|
|
imageSrc: "http://img.b2bpic.net/free-photo/solar-panels-industry-technician-high-tech-factory-inspection-quality-control-production_482257-132256.jpg"},
|
|
|
|
|
imageSrc: "http://img.b2bpic.net/free-photo/solar-panels-industry-technician-high-tech-factory-inspection-quality-control-production_482257-132256.jpg"
|
|
|
|
|
},
|
|
|
|
|
]}
|
|
|
|
|
testimonialRotationInterval={5000}
|
|
|
|
|
/>
|
|
|
|
|
@@ -126,11 +82,14 @@ export default function LandingPage() {
|
|
|
|
|
tagAnimation="slide-up"
|
|
|
|
|
features={[
|
|
|
|
|
{
|
|
|
|
|
id: "01", title: "Schedule", description: "Book online or call. Same-day or next-day availability. No long wait times.", imageSrc: "http://img.b2bpic.net/free-vector/medical-booking-application_23-2148558680.jpg", imageAlt: "Easy scheduling interface"},
|
|
|
|
|
id: "01", title: "Schedule", description: "Book online or call. Same-day or next-day availability. No long wait times.", imageSrc: "http://img.b2bpic.net/free-vector/medical-booking-application_23-2148558680.jpg", imageAlt: "Easy scheduling interface"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: "02", title: "Upfront Quote", description: "15-minute phone assessment. Firm pricing. No hidden fees or surprises.", imageSrc: "http://img.b2bpic.net/free-vector/hand-drawn-bankruptcy-concept_23-2148493435.jpg", imageAlt: "Transparent pricing consultation"},
|
|
|
|
|
id: "02", title: "Upfront Quote", description: "15-minute phone assessment. Firm pricing. No hidden fees or surprises.", imageSrc: "http://img.b2bpic.net/free-vector/hand-drawn-bankruptcy-concept_23-2148493435.jpg", imageAlt: "Transparent pricing consultation"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: "03", title: "Professional Haul", description: "Expert crew. Careful loading. Full cleanup. Damage-free guarantee.", imageSrc: "http://img.b2bpic.net/free-photo/african-american-activist-volunteering-tidy-forest-ecosystem_482257-93953.jpg", imageAlt: "Professional junk removal team at work"},
|
|
|
|
|
id: "03", title: "Professional Haul", description: "Expert crew. Careful loading. Full cleanup. Damage-free guarantee.", imageSrc: "http://img.b2bpic.net/free-photo/african-american-activist-volunteering-tidy-forest-ecosystem_482257-93953.jpg", imageAlt: "Professional junk removal team at work"
|
|
|
|
|
},
|
|
|
|
|
]}
|
|
|
|
|
gridVariant="three-columns-all-equal-width"
|
|
|
|
|
animationType="slide-up"
|
|
|
|
|
@@ -190,17 +149,23 @@ export default function LandingPage() {
|
|
|
|
|
author="Robert Williams, Homeowner"
|
|
|
|
|
avatars={[
|
|
|
|
|
{
|
|
|
|
|
src: "http://img.b2bpic.net/free-photo/handsome-business-man-wearing-suit-looking-camera-smiling-broadly-with-happy-face-standing-white-background_141793-54115.jpg", alt: "Customer testimonial avatar 1"},
|
|
|
|
|
src: "http://img.b2bpic.net/free-photo/handsome-business-man-wearing-suit-looking-camera-smiling-broadly-with-happy-face-standing-white-background_141793-54115.jpg", alt: "Customer testimonial avatar 1"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
src: "http://img.b2bpic.net/free-photo/portrait-young-attractive-woman-elegant-hotel-cafeteria_657883-403.jpg", alt: "Customer testimonial avatar 2"},
|
|
|
|
|
src: "http://img.b2bpic.net/free-photo/portrait-young-attractive-woman-elegant-hotel-cafeteria_657883-403.jpg", alt: "Customer testimonial avatar 2"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
src: "http://img.b2bpic.net/free-photo/close-up-portrait-young-bearded-man-white-shirt-jacket-posing-camera-with-broad-smile-isolated-gray_171337-629.jpg", alt: "Customer testimonial avatar 3"},
|
|
|
|
|
src: "http://img.b2bpic.net/free-photo/close-up-portrait-young-bearded-man-white-shirt-jacket-posing-camera-with-broad-smile-isolated-gray_171337-629.jpg", alt: "Customer testimonial avatar 3"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
src: "http://img.b2bpic.net/free-vector/man-avatar-collection_24908-60247.jpg", alt: "Customer testimonial avatar 4"},
|
|
|
|
|
src: "http://img.b2bpic.net/free-vector/man-avatar-collection_24908-60247.jpg", alt: "Customer testimonial avatar 4"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
src: "http://img.b2bpic.net/free-photo/young-beautiful-stylish-woman-with-natural-curly-hairstyle-smiling-positive-emotion-happy-isolated-white-background-summer-fashion-trend-hipster-style-looking-camera-green-vest_285396-2925.jpg", alt: "Customer testimonial avatar 5"},
|
|
|
|
|
src: "http://img.b2bpic.net/free-photo/young-beautiful-stylish-woman-with-natural-curly-hairstyle-smiling-positive-emotion-happy-isolated-white-background-summer-fashion-trend-hipster-style-looking-camera-green-vest_285396-2925.jpg", alt: "Customer testimonial avatar 5"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
src: "http://img.b2bpic.net/free-photo/smart-looking-teacher_53876-23045.jpg", alt: "Customer testimonial avatar 6"},
|
|
|
|
|
src: "http://img.b2bpic.net/free-photo/smart-looking-teacher_53876-23045.jpg", alt: "Customer testimonial avatar 6"
|
|
|
|
|
},
|
|
|
|
|
]}
|
|
|
|
|
ratingAnimation="slide-up"
|
|
|
|
|
avatarsAnimation="slide-up"
|
|
|
|
|
@@ -211,8 +176,8 @@ export default function LandingPage() {
|
|
|
|
|
<div id="contact" data-section="contact">
|
|
|
|
|
<ContactSplit
|
|
|
|
|
tag="Get Started"
|
|
|
|
|
title={confirmationCode ? `Welcome! Your Code: ${confirmationCode}` : "Your Quote Awaits"}
|
|
|
|
|
description={confirmationCode ? `Thanks for reaching out! We've sent a confirmation email to ${formData.email}. Our team will contact you within 15 minutes.` : "Fill out our quick assessment form or call us directly. Response guaranteed within 15 minutes during business hours."}
|
|
|
|
|
title="Your Quote Awaits"
|
|
|
|
|
description="Fill out our quick assessment form or call us directly. Response guaranteed within 15 minutes during business hours."
|
|
|
|
|
tagIcon={Phone}
|
|
|
|
|
tagAnimation="slide-up"
|
|
|
|
|
background={{ variant: "sparkles-gradient" }}
|
|
|
|
|
@@ -221,10 +186,9 @@ export default function LandingPage() {
|
|
|
|
|
imageAlt="MG Junk Removal team ready to help"
|
|
|
|
|
mediaAnimation="opacity"
|
|
|
|
|
mediaPosition="right"
|
|
|
|
|
inputPlaceholder={submissionStatus === "success" ? "Quote request submitted!" : "your@email.com"}
|
|
|
|
|
buttonText={submissionStatus === "loading" ? "Sending..." : "Get Quote"}
|
|
|
|
|
inputPlaceholder="Enter your email for quote"
|
|
|
|
|
buttonText="Get Quote"
|
|
|
|
|
termsText="We respect your privacy. Unsubscribe at any time. By submitting, you agree to our Terms and Conditions."
|
|
|
|
|
onSubmit={handleQuoteSubmit}
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|