From 7bf4c58862f6ed52e68281542d25f10b2bb518fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20MARQUET?= <72651575+BreizhHardware@users.noreply.github.com> Date: Tue, 26 Aug 2025 22:34:12 +0200 Subject: [PATCH] Update src/components/ContactSection.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/components/ContactSection.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/components/ContactSection.tsx b/src/components/ContactSection.tsx index 6300116..7a82c95 100644 --- a/src/components/ContactSection.tsx +++ b/src/components/ContactSection.tsx @@ -34,11 +34,21 @@ const ContactSection: React.FC = () => { const handleSubmit = async (e: React.FormEvent) => { e.preventDefault(); - setStatus({ type: 'loading' }); + setStatus({ type: 'loading' }); const serviceId = import.meta.env.VITE_EMAILJS_SERVICE_ID; const templateId = import.meta.env.VITE_EMAILJS_TEMPLATE_ID; + const userId = import.meta.env.VITE_EMAILJS_USER_ID; + if (!serviceId || !templateId || !userId) { + console.error('Missing required EmailJS environment variables:', { + VITE_EMAILJS_SERVICE_ID: serviceId, + VITE_EMAILJS_TEMPLATE_ID: templateId, + VITE_EMAILJS_USER_ID: userId + }); + setStatus({ type: 'error' }); + return; + } const templateParams = { name: formData.name, email: formData.email,