From 54970c2d33994e68bd521584f26be9e45e4920a5 Mon Sep 17 00:00:00 2001 From: Nareshkumar Rao Date: Wed, 2 Apr 2025 02:07:22 +0200 Subject: [PATCH] ensure pre-rendering does not fail --- src/app/contact/ContactComponent.tsx | 6 +++--- src/app/contact/page.tsx | 4 ---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/app/contact/ContactComponent.tsx b/src/app/contact/ContactComponent.tsx index f8dd4aa..f287b3d 100644 --- a/src/app/contact/ContactComponent.tsx +++ b/src/app/contact/ContactComponent.tsx @@ -7,7 +7,7 @@ import ReCAPTCHA from "react-google-recaptcha"; export default function ContactComponent({ recaptchaSiteKey, }: { - recaptchaSiteKey: string; + recaptchaSiteKey: string | undefined; }) { const inputStyle = { backgroundColor: "#111", @@ -57,7 +57,7 @@ export default function ContactComponent({ {"success" in state && "Submitted successfully!"} )} - + diff --git a/src/app/contact/page.tsx b/src/app/contact/page.tsx index 9590451..c631416 100644 --- a/src/app/contact/page.tsx +++ b/src/app/contact/page.tsx @@ -4,9 +4,5 @@ import ContactComponent from "./ContactComponent"; export default async function ContactPage() { const recaptchaSiteKey = process.env.RECAPTCHA_SITE_KEY; - if (!recaptchaSiteKey) { - console.error("ReCAPTCHA site key is not set"); - throw new Error("ReCAPTCHA not correctly configured"); - } return ; }