From b80723cd283527568750cd57c20ae4b045ebe8fb Mon Sep 17 00:00:00 2001 From: jwinterm Date: Thu, 29 Jan 2026 11:01:57 -0500 Subject: [PATCH] fix turnstile --- apps/web/package.json | 2 +- apps/web/src/components/contact/turnstile-widget.tsx | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/apps/web/package.json b/apps/web/package.json index 0bbb554..9cecab0 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -12,7 +12,7 @@ "test:ui": "playwright test --ui" }, "dependencies": { - "@marsidev/react-turnstile": "^1.0.2", + "@marsidev/react-turnstile": "^1.4.1", "@repo/config": "workspace:*", "@repo/ui": "workspace:*", "framer-motion": "^11.0.0", diff --git a/apps/web/src/components/contact/turnstile-widget.tsx b/apps/web/src/components/contact/turnstile-widget.tsx index a9a66fb..0a2ae9b 100644 --- a/apps/web/src/components/contact/turnstile-widget.tsx +++ b/apps/web/src/components/contact/turnstile-widget.tsx @@ -1,12 +1,19 @@ 'use client'; import { Turnstile } from '@marsidev/react-turnstile'; +const SITE_KEY = process.env.NEXT_PUBLIC_TURNSTILE_SITE_KEY; + export function TurnstileWidget({ onVerify }: { onVerify: (token: string) => void }) { + if (!SITE_KEY) { + console.warn('NEXT_PUBLIC_TURNSTILE_SITE_KEY is not set'); + return null; + } + return ( ); } \ No newline at end of file