diff --git a/frontend/src/components/WhatsAppButton.tsx b/frontend/src/components/WhatsAppButton.tsx
index d07082b..db7304b 100644
--- a/frontend/src/components/WhatsAppButton.tsx
+++ b/frontend/src/components/WhatsAppButton.tsx
@@ -6,7 +6,7 @@ import { useState, useEffect } from 'react';
export default function WhatsAppButton() {
const { t } = useLanguage();
- const [whatsappLink, setWhatsappLink] = useState('https://wa.me/5513998030036');
+ const [whatsappLink, setWhatsappLink] = useState('https://api.whatsapp.com/send/?phone=5513998030036&text&type=phone_number&app_absent=0');
const [mounted, setMounted] = useState(false);
useEffect(() => {
@@ -18,7 +18,7 @@ export default function WhatsAppButton() {
.then(data => {
if (data.whatsapp) {
const cleanNumber = data.whatsapp.replace(/\D/g, '');
- setWhatsappLink(`https://wa.me/${cleanNumber}`);
+ setWhatsappLink(`https://api.whatsapp.com/send/?phone=${cleanNumber}&text&type=phone_number&app_absent=0`);
}
})
.catch(console.error);
@@ -33,13 +33,21 @@ export default function WhatsAppButton() {
href={whatsappLink}
target="_blank"
rel="noopener noreferrer"
- className="fixed bottom-6 right-6 z-40 flex flex-row-reverse items-center justify-center bg-[#25D366] text-white w-14 h-14 rounded-full shadow-lg hover:bg-[#20bd5a] transition-all duration-300 group"
+ className="fixed bottom-6 right-6 z-40 bg-[#25D366] text-white w-14 h-14 rounded-full shadow-lg hover:shadow-xl transition-shadow duration-200 flex items-center justify-center flex-shrink-0"
aria-label={t('whatsapp.label')}
+ style={{
+ transition: 'all 0.2s ease-in-out',
+ }}
+ onMouseEnter={(e) => {
+ e.currentTarget.style.backgroundColor = '#20bd5a';
+ e.currentTarget.style.transform = 'scale(1.1)';
+ }}
+ onMouseLeave={(e) => {
+ e.currentTarget.style.backgroundColor = '#25D366';
+ e.currentTarget.style.transform = 'scale(1)';
+ }}
>
-
-
- {t('whatsapp.label')}
-
+
);
}