change hostname and remove http block

This commit is contained in:
Shulammite-Aso 2022-02-19 03:10:52 +00:00 committed by Robo Quat
parent cfa6091aa0
commit d4a2db8e16

View File

@ -558,16 +558,14 @@ export function GitIntegrationModal(props: ({
const updateHostValue = (host: string) => {
if (mode === "new") {
let verifiedHost = host;
let newHostValue = host;
if (host.startsWith("https://")) {
verifiedHost = host.replace("https://","");
} else if (host.startsWith("http://")) {
verifiedHost = host.replace("http://","");
newHostValue = host.replace("https://","");
}
setHost(verifiedHost);
setRedirectURL(callbackUrl(verifiedHost));
setHost(newHostValue);
setRedirectURL(callbackUrl(newHostValue));
setErrorMessage(undefined);
}
}