fix: disable send button if the CAPTCHA is not solved

This commit is contained in:
Dorian Niemiec 2024-11-07 22:06:51 +01:00
parent 22d082b9a4
commit 401d7c397f

View file

@ -103,7 +103,9 @@ function Contact() {
<button <button
type="submit" type="submit"
className="bg-primary text-primary-foreground p-2 rounded-md text-center w-full hover:bg-primary/75 disabled:bg-primary/50 transition-colors" className="bg-primary text-primary-foreground p-2 rounded-md text-center w-full hover:bg-primary/75 disabled:bg-primary/50 transition-colors"
disabled={!name || !email || !isEmail(email) || !message} disabled={
!name || !email || !isEmail(email) || !message || !hCaptchaToken
}
> >
<Send className="inline align-top mr-2" /> <Send className="inline align-top mr-2" />
<span className="align-middle">Send</span> <span className="align-middle">Send</span>