diff --git a/app/login.tsx b/app/login.tsx index 2270018d..a7b19375 100644 --- a/app/login.tsx +++ b/app/login.tsx @@ -55,25 +55,8 @@ const Login: React.FC = () => { } }; - const parsedServerURL = useMemo(() => { - let parsedServerURL = serverURL.trim(); - - if (parsedServerURL) { - parsedServerURL = parsedServerURL.endsWith("/") - ? parsedServerURL.replace("/", "") - : parsedServerURL; - parsedServerURL = parsedServerURL.startsWith("http") - ? parsedServerURL - : "http://" + parsedServerURL; - - return parsedServerURL; - } - - return ""; - }, [serverURL]); - const handleConnect = (url: string) => { - setServer({ address: url }); + setServer({ address: url.trim() }); }; if (api?.basePath) { @@ -165,9 +148,7 @@ const Login: React.FC = () => { textContentType="URL" maxLength={500} /> - +