From b67a4f18435904c84e4a53d232d5165a4affda32 Mon Sep 17 00:00:00 2001 From: simon Date: Sun, 15 Sep 2024 18:48:16 +0200 Subject: [PATCH] fixed some inconsistencies --- app/login.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/login.tsx b/app/login.tsx index c47b76a7..780d8a13 100644 --- a/app/login.tsx +++ b/app/login.tsx @@ -103,13 +103,17 @@ const Login: React.FC = () => { } const handleConnect = async (url: string) => { + url = url.trim(); if (!url.startsWith("http")) { const result = await checkUrl(url); - if (result === undefined) return; + if (result === undefined){ + Alert.alert("Invalid URL", "Please enter a valid URL"); + return; + } url = result; } console.log(url); - setServer({ address: url.trim() }); + setServer({ address: url }); }; const handleQuickConnect = async () => {