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:
@@ -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 }) => {
|
||||
|
||||
@@ -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> = ({
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user