From b221d2bcc16547874bd3eac2dadc8c3c8c5d54fb Mon Sep 17 00:00:00 2001 From: Chneemann Date: Fri, 31 Jul 2026 08:51:33 +0200 Subject: [PATCH] refactor: improve contact form anti-spam handling --- src/components/Contact.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/Contact.tsx b/src/components/Contact.tsx index d47f863..edc7027 100644 --- a/src/components/Contact.tsx +++ b/src/components/Contact.tsx @@ -24,9 +24,9 @@ export default function Contact() { const handleSubmit = async (e: React.FormEvent) => { e.preventDefault(); - // Anti-spam check 1: Submissions faster than 3 seconds are treated as automated bots + // Anti-spam check 1: Submissions faster than 1 seconds are treated as automated bots const timeTaken = (Date.now() - formLoadTime) / 1000; - if (timeTaken < 3) { + if (timeTaken < 1) { setSubmitted(true); return; } @@ -52,7 +52,6 @@ export default function Contact() { name, email, message, - _replyto: email, _subject: `Portfolio Contact: ${name}`, }), }); @@ -158,11 +157,12 @@ export default function Contact() { ) : ( /* Form Container */
- {/* Hidden Honeypot Field for Bot Catching */} -