From 865994526844ef0705698bcf348d4b8f81cc99b9 Mon Sep 17 00:00:00 2001 From: futurGH Date: Wed, 20 Dec 2023 19:56:05 -0500 Subject: [PATCH] Use Oxygen.env for recaptcha key --- src/lib/ReCaptcha.client.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/lib/ReCaptcha.client.tsx b/src/lib/ReCaptcha.client.tsx index 27f58f4..cbbf538 100644 --- a/src/lib/ReCaptcha.client.tsx +++ b/src/lib/ReCaptcha.client.tsx @@ -1,10 +1,8 @@ import { GoogleReCaptchaProvider } from "react-google-recaptcha-v3"; import type { ReactNode } from "react"; +const env: Record = typeof Oxygen !== "undefined" && "env" in Oxygen ? Oxygen.env : import.meta.env; + export function ReCaptcha({ children }: { children: ReactNode }) { - return ( - - {children} - - ); + return {children}; }