8 Commits

Author SHA1 Message Date
e97c997931 Merge version_7 into main
Merge version_7 into main
2026-03-06 05:52:32 +00:00
a1f5166ef2 Update src/app/page.tsx 2026-03-06 05:52:27 +00:00
f4fe2d25fb Add src/app/api/contact/route.ts 2026-03-06 05:52:26 +00:00
f0e293d708 Merge version_6 into main
Merge version_6 into main
2026-03-06 05:36:01 +00:00
68482004ac Update src/app/page.tsx 2026-03-06 05:35:57 +00:00
20171cb342 Merge version_5 into main
Merge version_5 into main
2026-03-06 05:22:13 +00:00
e7014cd9b1 Update src/app/page.tsx 2026-03-06 05:22:09 +00:00
dcdc958df3 Merge version_4 into main
Merge version_4 into main
2026-03-06 05:09:32 +00:00
2 changed files with 61 additions and 3 deletions

View File

@@ -0,0 +1,58 @@
import { NextRequest, NextResponse } from 'next/server';
export async function POST(request: NextRequest) {
try {
const body = await request.json();
const { email, recipientEmail = 'Luxorasites.build@gmail.com' } = body;
if (!email) {
return NextResponse.json(
{ error: 'Email is required' },
{ status: 400 }
);
}
// Send email using a service like Resend, SendGrid, or Nodemailer
// For now, we'll use Resend (popular choice for Next.js)
// You'll need to install: npm install resend
// And set RESEND_API_KEY environment variable
// Example using Resend:
const response = await fetch('https://api.resend.com/emails', {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.RESEND_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
from: 'noreply@luxorasites.com',
to: recipientEmail,
subject: 'New Website Inquiry',
html: `
<h2>New Contact Form Submission</h2>
<p><strong>Email:</strong> ${email}</p>
<p>A new visitor has submitted their email through the contact form on your website.</p>
`,
}),
});
if (!response.ok) {
console.error('Failed to send email:', await response.text());
return NextResponse.json(
{ error: 'Failed to send email' },
{ status: 500 }
);
}
return NextResponse.json(
{ success: true, message: 'Email sent successfully' },
{ status: 200 }
);
} catch (error) {
console.error('Contact form error:', error);
return NextResponse.json(
{ error: 'Internal server error' },
{ status: 500 }
);
}
}

View File

@@ -251,20 +251,20 @@ export default function LandingPage() {
<ContactCenter
tag="Ready to Win?"
title="Your Next Customer Is Searching Online Right Now."
description="Don't let them find your competitor. Launch your luxury website and start converting customers today. Limited availability for new projects. Call us at 479-326-0852 to get started."
description="Don't let them find your competitor. Launch your luxury website and start converting customers today. Limited availability for new projects. Email us at Luxorasites.build@gmail.com to get started."
background={{ variant: "rotated-rays-animated" }}
useInvertedBackground={true}
inputPlaceholder="your@email.com"
buttonText="Start My Website"
termsText="We'll contact you within 24 hours to discuss your project. No spam, just premium web solutions."
onSubmit={(email: string) => {
// Send email to luxorasites.build@gmail.com
// Send email to Luxorasites.build@gmail.com
fetch('/api/contact', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ email }),
body: JSON.stringify({ email, recipientEmail: 'Luxorasites.build@gmail.com' }),
}).catch(err => console.error('Error submitting contact form:', err));
}}
/>