Improve Supabase connection testing

Enhance connection testing to provide more detailed error information.
This commit is contained in:
gpt-engineer-app[bot]
2025-03-15 12:17:50 +00:00
parent f00c69a4ec
commit 893e1cf0aa
4 changed files with 181 additions and 18 deletions

View File

@@ -4,7 +4,7 @@ import { Link, useNavigate } from "react-router-dom";
import { Label } from "@/components/ui/label";
import { Input } from "@/components/ui/input";
import { Button } from "@/components/ui/button";
import { ArrowRight, Mail, KeyRound, Eye, EyeOff, RefreshCw } from "lucide-react";
import { ArrowRight, Mail, KeyRound, Eye, EyeOff, RefreshCw, Shield } from "lucide-react";
import { useToast } from "@/hooks/useToast.wrapper";
import { useAuth } from "@/contexts/auth";
import { testSupabaseConnection } from "@/lib/supabase";
@@ -228,6 +228,15 @@ const Login = () => {
<p className="font-medium">Supabase URL:</p>
<p className="break-all bg-gray-100 p-1 rounded">{testResults?.url || '알 수 없음'}</p>
</div>
{testResults?.usingProxy && (
<div>
<p className="font-medium">CORS :</p>
<div className="flex items-center gap-1">
<Shield className="h-3 w-3 text-blue-500" />
<p className="break-all text-blue-500"> - {testResults.proxyUrl}</p>
</div>
</div>
)}
<div>
<p className="font-medium"> :</p>
<p>{testResults?.client ? '성공' : '실패'}</p>
@@ -247,6 +256,15 @@ const Login = () => {
<p>: {testResults.database ? '✅' : '❌'}</p>
</div>
)}
<div className="text-right pt-1">
<Link
to="/supabase-settings"
className="inline-flex items-center text-neuro-income hover:underline"
>
<span>Supabase </span>
<ArrowRight className="h-3 w-3 ml-1" />
</Link>
</div>
</div>
</details>
</div>