feat(contact-us): Add hCaptcha verification to contact form

- Install @hcaptcha/react-hcaptcha dependency for CAPTCHA protection
- Add hCaptcha component integration with site key configuration
- Implement captcha token state management with verification callbacks
- Add token validation before form submission with user feedback
- Reset captcha after successful form submission
- Include captcha in form submission payload as hcaptcha_token
- Update Next.js to version 15.5.7 for compatibility
- Enhance form security by requiring CAPTCHA verification before contact submission
This commit is contained in:
AmirReza Jamali
2025-12-08 16:56:14 +03:30
parent 1204b2d3db
commit 2182386f9c
3 changed files with 102 additions and 43 deletions
+2 -1
View File
@@ -8,13 +8,14 @@
"start": "next start"
},
"dependencies": {
"@hcaptcha/react-hcaptcha": "^1.16.0",
"@tanstack/react-query": "^5.90.7",
"@types/dompurify": "^3.2.0",
"apexcharts": "^5.3.5",
"axios": "^1.12.2",
"dompurify": "^3.3.0",
"firebase": "^12.6.0",
"next": "15.5.5",
"next": "^15.5.7",
"react": "19.1.0",
"react-apexcharts": "^1.8.0",
"react-dom": "19.1.0",