mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-24 15:51:13 -05:00
Improve error handling and environment configuration across the application
Enhance input validation, update environment variable usage for Supabase and Turnstile, and refine image upload and auth logic for better robustness and developer experience. Replit-Commit-Author: Agent Replit-Commit-Session-Id: cb061c75-702e-4b89-a8d1-77a96cdcdfbb Replit-Commit-Checkpoint-Type: intermediate_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7cdf4e95-3f41-4180-b8e3-8ef56d032c0e/cb061c75-702e-4b89-a8d1-77a96cdcdfbb/ANdRXVZ
This commit is contained in:
@@ -18,7 +18,7 @@ export function TurnstileCaptcha({
|
||||
onSuccess,
|
||||
onError,
|
||||
onExpire,
|
||||
siteKey = "0x4AAAAAAAk8oZ8Z8Z8Z8Z8Z", // Default test key - replace in production
|
||||
siteKey = import.meta.env.VITE_TURNSTILE_SITE_KEY,
|
||||
theme = 'auto',
|
||||
size = 'normal',
|
||||
className = ''
|
||||
@@ -82,12 +82,12 @@ export function TurnstileCaptcha({
|
||||
}
|
||||
}, [loading]);
|
||||
|
||||
if (!siteKey || siteKey === "0x4AAAAAAAk8oZ8Z8Z8Z8Z8Z") {
|
||||
if (!siteKey) {
|
||||
return (
|
||||
<Callout variant="warning">
|
||||
<AlertCircle className="h-4 w-4" />
|
||||
<CalloutDescription>
|
||||
CAPTCHA is using test keys. Configure VITE_TURNSTILE_SITE_KEY for production.
|
||||
CAPTCHA is not configured. Please set VITE_TURNSTILE_SITE_KEY environment variable.
|
||||
</CalloutDescription>
|
||||
</Callout>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user