diff --git a/components/login/TVLogin.tsx b/components/login/TVLogin.tsx index d632fe4d..2b4348d8 100644 --- a/components/login/TVLogin.tsx +++ b/components/login/TVLogin.tsx @@ -9,12 +9,10 @@ import { Alert, Animated, Easing, - KeyboardAvoidingView, Pressable, ScrollView, View, } from "react-native"; -import { SafeAreaView } from "react-native-safe-area-context"; import { z } from "zod"; import { Button } from "@/components/Button"; import { Text } from "@/components/common/Text"; @@ -414,8 +412,10 @@ export const TVLogin: React.FC = () => { const handleConnect = useCallback(async (url: string) => { url = url.trim().replace(/\/$/, ""); + console.log("[TVLogin] handleConnect called with:", url); try { const result = await checkUrl(url); + console.log("[TVLogin] checkUrl result:", result); if (result === undefined) { Alert.alert( t("login.connection_failed"), @@ -423,8 +423,12 @@ export const TVLogin: React.FC = () => { ); return; } + console.log("[TVLogin] Calling setServer with:", result); await setServer({ address: result }); - } catch {} + console.log("[TVLogin] setServer completed successfully"); + } catch (error) { + console.error("[TVLogin] Error in handleConnect:", error); + } }, []); const handleQuickConnect = async () => { @@ -445,9 +449,12 @@ export const TVLogin: React.FC = () => { } }; + // Debug logging + console.log("[TVLogin] Render - api?.basePath:", api?.basePath); + return ( - - + + {api?.basePath ? ( // ==================== CREDENTIALS SCREEN ==================== { )} - + {/* Save Account Modal */} { onDelete={handleServerActionDelete} onClose={() => setShowServerActionSheet(false)} /> - + ); };