Fix type error in SupabaseConnectionTest

The TestResults type was not assignable to the TestResult type in the SupabaseConnectionTest component. This commit ensures the types are compatible.
This commit is contained in:
gpt-engineer-app[bot]
2025-03-15 12:43:46 +00:00
parent dc92138a48
commit 1e6d360d69
5 changed files with 24 additions and 26 deletions

View File

@@ -2,18 +2,10 @@
import React from "react";
import { Link } from "react-router-dom";
import { ArrowRight, Shield } from "lucide-react";
import { TestResults } from "@/lib/supabase/tests/types";
interface TestResultProps {
testResults: {
url?: string;
usingProxy?: boolean;
proxyUrl?: string;
client?: boolean;
restApi?: boolean;
auth?: boolean;
database?: boolean;
errors: string[];
} | null;
testResults: TestResults | null;
}
const SupabaseConnectionStatus: React.FC<TestResultProps> = ({ testResults }) => {

View File

@@ -3,10 +3,11 @@ import React, { useState } from "react";
import { RefreshCw } from "lucide-react";
import { testSupabaseConnection } from "@/lib/supabase";
import { useToast } from "@/hooks/useToast.wrapper";
import { TestResults } from "@/lib/supabase/tests/types";
interface TestConnectionSectionProps {
setLoginError: (error: string | null) => void;
setTestResults: (results: any) => void;
setTestResults: (results: TestResults) => void;
}
const TestConnectionSection: React.FC<TestConnectionSectionProps> = ({

View File

@@ -1,4 +1,3 @@
import React, { useState } from 'react';
import { Button } from "@/components/ui/button";
import { RefreshCw, Info, HelpCircle, AlertCircle } from "lucide-react";
@@ -6,22 +5,10 @@ import { toast } from "@/hooks/useToast.wrapper";
import { testSupabaseConnection } from '@/lib/supabase';
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@/components/ui/collapsible";
import { Alert, AlertTitle, AlertDescription } from "@/components/ui/alert";
interface TestResult {
url: string;
proxyUrl: string;
usingProxy: boolean;
proxyType?: string;
client: boolean;
restApi: boolean;
auth: boolean;
database: boolean;
errors: string[];
debugInfo?: any;
}
import { TestResults } from '@/lib/supabase/tests/types';
const SupabaseConnectionTest: React.FC = () => {
const [testResults, setTestResults] = useState<TestResult | null>(null);
const [testResults, setTestResults] = useState<TestResults | null>(null);
const [isTesting, setIsTesting] = useState(false);
const [showDebug, setShowDebug] = useState(false);