From 3782c2ff3f01be7321cef27d093ea61c6d7ccc5d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ren=C3=AA=20Boaventura?= <reneboaventuraneto@gmail.com>
Date: Tue, 18 Jun 2024 15:51:18 -0300
Subject: [PATCH] bring back recaptcha

---
 src/components/NewsletterSignupForm.tsx | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/components/NewsletterSignupForm.tsx b/src/components/NewsletterSignupForm.tsx
index 90fc609b..f12cc560 100644
--- a/src/components/NewsletterSignupForm.tsx
+++ b/src/components/NewsletterSignupForm.tsx
@@ -14,6 +14,8 @@ import {
   usePrevious,
 } from '@pluralsh/design-system'
 
+import ReCAPTCHA from 'react-google-recaptcha'
+
 import { isValidEmail } from '@src/utils/text'
 
 import { FooterHeading, FooterNavLink } from './FooterNav'
@@ -181,6 +183,15 @@ export function NewsletterSignupForm() {
           {response.message}
         </ResponsiveText>
       )}
+      <div className="mt-small">
+        <ReCAPTCHA
+          ref={recaptchaRef}
+          sitekey={process.env.NEXT_PUBLIC_SITE_RECAPTCHA_KEY}
+          onChange={(val) => {
+            setRecaptchaVal(val)
+          }}
+        />
+      </div>
     </form>
   )
 }