Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d0d38fa3fd | |||
| 241ab68141 | |||
| 54dc618653 | |||
| ba89493c27 |
@@ -13,6 +13,22 @@ import FooterMedia from '@/components/sections/footer/FooterMedia';
|
||||
import { Clock, DollarSign, Shield, Star, Zap, Wrench } from 'lucide-react';
|
||||
|
||||
export default function LandingPage() {
|
||||
const handleHeroButtonClick = (href: string) => {
|
||||
if (href.startsWith('tel:')) {
|
||||
window.location.href = href;
|
||||
} else if (href.startsWith('#')) {
|
||||
const element = document.getElementById(href.substring(1));
|
||||
if (element) {
|
||||
element.scrollIntoView({ behavior: 'smooth' });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const handleContactSubmit = (data: Record<string, string>) => {
|
||||
console.log('Form submitted:', data);
|
||||
// Handle form submission logic here
|
||||
};
|
||||
|
||||
return (
|
||||
<ThemeProvider
|
||||
defaultButtonVariant="bounce-effect"
|
||||
@@ -56,8 +72,8 @@ export default function LandingPage() {
|
||||
rating={5}
|
||||
ratingText="4.6 stars from 105 reviews"
|
||||
buttons={[
|
||||
{ text: "Call Now: 064 143 7036", href: "tel:0641437036" },
|
||||
{ text: "Schedule Service", href: "#contact" }
|
||||
{ text: "Call Now: 064 143 7036", href: "tel:0641437036", onClick: () => handleHeroButtonClick("tel:0641437036") },
|
||||
{ text: "Schedule Service", href: "#contact", onClick: () => handleHeroButtonClick("#contact") }
|
||||
]}
|
||||
mediaAnimation="slide-up"
|
||||
buttonAnimation="slide-up"
|
||||
@@ -93,7 +109,12 @@ export default function LandingPage() {
|
||||
mediaAnimation="slide-up"
|
||||
buttonAnimation="slide-up"
|
||||
tagAnimation="slide-up"
|
||||
buttons={[{ text: "Get Help Today", href: "tel:0641437036" }]}
|
||||
buttons={[
|
||||
{
|
||||
text: "Get Help Today",
|
||||
href: "tel:0641437036", onClick: () => handleHeroButtonClick("tel:0641437036")
|
||||
}
|
||||
]}
|
||||
imagePosition="right"
|
||||
ariaLabel="About R & R Electrical section"
|
||||
/>
|
||||
@@ -247,6 +268,7 @@ export default function LandingPage() {
|
||||
mediaAnimation="slide-up"
|
||||
mediaPosition="right"
|
||||
buttonText="Request Service"
|
||||
onSubmit={handleContactSubmit}
|
||||
ariaLabel="Contact form - R & R Electrical"
|
||||
/>
|
||||
</div>
|
||||
@@ -285,4 +307,4 @@ export default function LandingPage() {
|
||||
</div>
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user