Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 000e164313 | |||
| e7c9e30c90 | |||
| 5863aa6965 | |||
| 1238c9c4ce | |||
| 23c9592c89 |
@@ -1,11 +1,7 @@
|
|||||||
import type { Metadata } from "next";
|
import type { Metadata } from "next";
|
||||||
import { Inter } from "next/font/google";
|
|
||||||
import "./globals.css";
|
|
||||||
|
|
||||||
const inter = Inter({ subsets: ["latin"], variable: "--font-inter" });
|
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
export const metadata: Metadata = {
|
||||||
title: "Cerramientos Walter - Ventanas de Aluminio y Cerramientos a Medida", description: "Especialistas en ventanas de aluminio, cerramientos, rejas, mosquiteros y soluciones a medida. Trabajos prolijos con materiales de calidad."};
|
title: "Cerramientos Walter", description: "Especialistas en ventanas de aluminio, cerramientos, rejas y soluciones a medida"};
|
||||||
|
|
||||||
export default function RootLayout({
|
export default function RootLayout({
|
||||||
children,
|
children,
|
||||||
@@ -14,7 +10,7 @@ export default function RootLayout({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<html lang="es">
|
<html lang="es">
|
||||||
<body className={`${inter.variable} antialiased`}>
|
<body>
|
||||||
{children}
|
{children}
|
||||||
|
|
||||||
<script
|
<script
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import TestimonialCardTen from "@/components/sections/testimonial/TestimonialCar
|
|||||||
import ProductCardOne from "@/components/sections/product/ProductCardOne";
|
import ProductCardOne from "@/components/sections/product/ProductCardOne";
|
||||||
import ContactSplit from "@/components/sections/contact/ContactSplit";
|
import ContactSplit from "@/components/sections/contact/ContactSplit";
|
||||||
import FooterBaseCard from "@/components/sections/footer/FooterBaseCard";
|
import FooterBaseCard from "@/components/sections/footer/FooterBaseCard";
|
||||||
|
import WhatsAppButton from "@/components/whatsapp/WhatsAppButton";
|
||||||
import { Sparkles, CheckCircle, Shield, Wind, Wrench, Hammer } from "lucide-react";
|
import { Sparkles, CheckCircle, Shield, Wind, Wrench, Hammer } from "lucide-react";
|
||||||
|
|
||||||
export default function HomePage() {
|
export default function HomePage() {
|
||||||
@@ -245,6 +246,12 @@ export default function HomePage() {
|
|||||||
copyrightText="© 2025 Cerramientos Walter. Todos los derechos reservados. Buenos Aires, Argentina."
|
copyrightText="© 2025 Cerramientos Walter. Todos los derechos reservados. Buenos Aires, Argentina."
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{/* WhatsApp Floating Button */}
|
||||||
|
<WhatsAppButton
|
||||||
|
phoneNumber="5491139493469"
|
||||||
|
message="Hola, quiero consultar por un presupuesto."
|
||||||
|
/>
|
||||||
</ThemeProvider>
|
</ThemeProvider>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
39
src/components/whatsapp/WhatsAppButton.tsx
Normal file
39
src/components/whatsapp/WhatsAppButton.tsx
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
"use client";
|
||||||
|
|
||||||
|
import { MessageCircle } from "lucide-react";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
|
||||||
|
interface WhatsAppButtonProps {
|
||||||
|
phoneNumber: string;
|
||||||
|
message: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function WhatsAppButton({
|
||||||
|
phoneNumber,
|
||||||
|
message,
|
||||||
|
}: WhatsAppButtonProps) {
|
||||||
|
const [isVisible, setIsVisible] = useState(false);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
setIsVisible(true);
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
const handleClick = () => {
|
||||||
|
const encodedMessage = encodeURIComponent(message);
|
||||||
|
const whatsappUrl = `https://wa.me/${phoneNumber}?text=${encodedMessage}`;
|
||||||
|
window.open(whatsappUrl, "_blank");
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!isVisible) return null;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<button
|
||||||
|
onClick={handleClick}
|
||||||
|
aria-label="Contact us on WhatsApp"
|
||||||
|
className="fixed bottom-8 right-8 z-50 flex items-center justify-center w-14 h-14 rounded-full bg-green-500 hover:bg-green-600 shadow-lg transition-all duration-300 hover:scale-110 active:scale-95"
|
||||||
|
title="Chat on WhatsApp"
|
||||||
|
>
|
||||||
|
<MessageCircle className="w-6 h-6 text-white" strokeWidth={2} />
|
||||||
|
</button>
|
||||||
|
);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user