From 8db148e37169f347167044e340887129a905ce9c Mon Sep 17 00:00:00 2001 From: leon3108 Date: Fri, 12 Apr 2024 09:26:24 +0200 Subject: [PATCH] remove NEXT_PUBLIC in varenv --- .env.template | 8 ++++---- src/app/GoogleCaptchaWrapper.tsx | 3 +-- src/components/contact.tsx | 6 +++--- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.env.template b/.env.template index ecacf2c..2d77fb1 100644 --- a/.env.template +++ b/.env.template @@ -1,6 +1,6 @@ RECAPTCHA_API_KEY="" -NEXT_PUBLIC_RECAPTCHA_SITE_KEY="" -NEXT_PUBLIC_EMAILJS_API_KEY="" -NEXT_PUBLIC_EMAILJS_TEMPLATE_ID="" -NEXT_PUBLIC_EMAILJS_SERVICE_ID="" +RECAPTCHA_SITE_KEY="" +EMAILJS_API_KEY="" +EMAILJS_TEMPLATE_ID="" +EMAILJS_SERVICE_ID="" LOCAL=true \ No newline at end of file diff --git a/src/app/GoogleCaptchaWrapper.tsx b/src/app/GoogleCaptchaWrapper.tsx index 50426bb..92ebba2 100644 --- a/src/app/GoogleCaptchaWrapper.tsx +++ b/src/app/GoogleCaptchaWrapper.tsx @@ -6,8 +6,7 @@ export default function GoogleCaptchaWrapper({ }: { children: React.ReactNode }) { - const recaptchaKey: string | undefined = - process?.env?.NEXT_PUBLIC_RECAPTCHA_SITE_KEY + const recaptchaKey: string | undefined = process?.env?.RECAPTCHA_SITE_KEY return ( {children} diff --git a/src/components/contact.tsx b/src/components/contact.tsx index 4508830..771b8b3 100644 --- a/src/components/contact.tsx +++ b/src/components/contact.tsx @@ -58,11 +58,11 @@ export default function Contact() { } emailjs .send( - process.env.NEXT_PUBLIC_EMAILJS_SERVICE_ID!, - process.env.NEXT_PUBLIC_EMAILJS_TEMPLATE_ID!, + process.env.EMAILJS_SERVICE_ID!, + process.env.EMAILJS_TEMPLATE_ID!, params, { - publicKey: process.env.NEXT_PUBLIC_EMAILJS_API_KEY!, + publicKey: process.env.EMAILJS_API_KEY!, }, ) .then(