diff --git a/.env.template b/.env.template
index 2d77fb1..1a1a9dd 100644
--- a/.env.template
+++ b/.env.template
@@ -1,6 +1,5 @@
-RECAPTCHA_API_KEY=""
-RECAPTCHA_SITE_KEY=""
-EMAILJS_API_KEY=""
-EMAILJS_TEMPLATE_ID=""
-EMAILJS_SERVICE_ID=""
+NEXT_PUBLIC_EMAILJS_API_KEY=""
+NEXT_PUBLIC_EMAILJS_SERVICE_ID=""
+NEXT_PUBLIC_EMAILJS_TEMPLATE_ID=""
+NEXT_PUBLIC_CAPTCHA_SITE_KEY=""
LOCAL=true
\ No newline at end of file
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index b16510a..5bd0ec9 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -33,11 +33,10 @@ jobs:
- name: Build with Next.js 🏗️
run: npx next build
env:
- EMAILJS_API_KEY: ${{ vars.EMAILJS_API_KEY }}
- EMAILJS_SERVICE_ID: ${{ vars.EMAILJS_SERVICE_ID }}
- EMAILJS_TEMPLATE_ID: ${{ vars.EMAILJS_TEMPLATE_ID }}
- RECAPTCHA_API_KEY: ${{ vars.RECAPTCHA_API_KEY }}
- RECAPTCHA_SITE_KEY: ${{ vars.RECAPTCHA_SITE_KEY }}
+ NEXT_PUBLIC_EMAILJS_API_KEY: ${{ vars.NEXT_PUBLIC_EMAILJS_API_KEY }}
+ NEXT_PUBLIC_EMAILJS_SERVICE_ID: ${{ vars.NEXT_PUBLIC_EMAILJS_SERVICE_ID }}
+ NEXT_PUBLIC_EMAILJS_TEMPLATE_ID: ${{ vars.NEXT_PUBLIC_EMAILJS_TEMPLATE_ID }}
+ NEXT_PUBLIC_CAPTCHA_SITE_KEY: ${{ vars.NEXT_PUBLIC_CAPTCHA_SITE_KEY }}
- name: Debug
run: ls -la
diff --git a/package.json b/package.json
index 76965fb..cfa75e2 100644
--- a/package.json
+++ b/package.json
@@ -28,7 +28,7 @@
"next-themes": "^0.2.1",
"react": "^18",
"react-dom": "^18",
- "react-google-recaptcha-v3": "^1.10.1",
+ "react-google-recaptcha": "^3.1.0",
"react-hook-form": "^7.50.1",
"react-icons": "^5.0.1",
"sharp": "^0.33.2",
@@ -41,6 +41,7 @@
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
+ "@types/react-google-recaptcha": "^2.1.9",
"autoprefixer": "^10.0.1",
"eslint": "^8.56.0",
"eslint-config-next": "14.1.0",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index a63e91b..184d490 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -62,9 +62,9 @@ dependencies:
react-dom:
specifier: ^18
version: 18.2.0(react@18.2.0)
- react-google-recaptcha-v3:
- specifier: ^1.10.1
- version: 1.10.1(react-dom@18.2.0)(react@18.2.0)
+ react-google-recaptcha:
+ specifier: ^3.1.0
+ version: 3.1.0(react@18.2.0)
react-hook-form:
specifier: ^7.50.1
version: 7.51.2(react@18.2.0)
@@ -97,6 +97,9 @@ devDependencies:
'@types/react-dom':
specifier: ^18
version: 18.2.24
+ '@types/react-google-recaptcha':
+ specifier: ^2.1.9
+ version: 2.1.9
autoprefixer:
specifier: ^10.0.1
version: 10.4.19(postcss@8.4.38)
@@ -1474,6 +1477,12 @@ packages:
dependencies:
'@types/react': 18.2.74
+ /@types/react-google-recaptcha@2.1.9:
+ resolution: {integrity: sha512-nT31LrBDuoSZJN4QuwtQSF3O89FVHC4jLhM+NtKEmVF5R1e8OY0Jo4//x2Yapn2aNHguwgX5doAq8Zo+Ehd0ug==}
+ dependencies:
+ '@types/react': 18.2.74
+ dev: true
+
/@types/react@18.2.74:
resolution: {integrity: sha512-9AEqNZZyBx8OdZpxzQlaFEVCSFUM2YXJH46yPOiOpm078k6ZLOCcuAzGum/zK8YBwY+dbahVNbHrbgrAwIRlqw==}
dependencies:
@@ -3530,7 +3539,6 @@ packages:
loose-envify: 1.4.0
object-assign: 4.1.1
react-is: 16.13.1
- dev: true
/punycode@2.3.1:
resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==}
@@ -3540,6 +3548,16 @@ packages:
/queue-microtask@1.2.3:
resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==}
+ /react-async-script@1.2.0(react@18.2.0):
+ resolution: {integrity: sha512-bCpkbm9JiAuMGhkqoAiC0lLkb40DJ0HOEJIku+9JDjxX3Rcs+ztEOG13wbrOskt3n2DTrjshhaQ/iay+SnGg5Q==}
+ peerDependencies:
+ react: '>=16.4.1'
+ dependencies:
+ hoist-non-react-statics: 3.3.2
+ prop-types: 15.8.1
+ react: 18.2.0
+ dev: false
+
/react-dom@18.2.0(react@18.2.0):
resolution: {integrity: sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==}
peerDependencies:
@@ -3550,15 +3568,14 @@ packages:
scheduler: 0.23.0
dev: false
- /react-google-recaptcha-v3@1.10.1(react-dom@18.2.0)(react@18.2.0):
- resolution: {integrity: sha512-K3AYzSE0SasTn+XvV2tq+6YaxM+zQypk9rbCgG4OVUt7Rh4ze9basIKefoBz9sC0CNslJj9N1uwTTgRMJQbQJQ==}
+ /react-google-recaptcha@3.1.0(react@18.2.0):
+ resolution: {integrity: sha512-cYW2/DWas8nEKZGD7SCu9BSuVz8iOcOLHChHyi7upUuVhkpkhYG/6N3KDiTQ3XAiZ2UAZkfvYKMfAHOzBOcGEg==}
peerDependencies:
- react: ^16.3 || ^17.0 || ^18.0
- react-dom: ^17.0 || ^18.0
+ react: '>=16.4.1'
dependencies:
- hoist-non-react-statics: 3.3.2
+ prop-types: 15.8.1
react: 18.2.0
- react-dom: 18.2.0(react@18.2.0)
+ react-async-script: 1.2.0(react@18.2.0)
dev: false
/react-hook-form@7.51.2(react@18.2.0):
diff --git a/src/app/GoogleCaptchaWrapper.tsx b/src/app/GoogleCaptchaWrapper.tsx
deleted file mode 100644
index 92ebba2..0000000
--- a/src/app/GoogleCaptchaWrapper.tsx
+++ /dev/null
@@ -1,15 +0,0 @@
-'use client'
-import { GoogleReCaptchaProvider } from 'react-google-recaptcha-v3'
-
-export default function GoogleCaptchaWrapper({
- children,
-}: {
- children: React.ReactNode
-}) {
- const recaptchaKey: string | undefined = process?.env?.RECAPTCHA_SITE_KEY
- return (
-