diff --git a/tranga-website/src/Components/Settings/Settings.tsx b/tranga-website/src/Components/Settings/Settings.tsx index ab4c288..e3172fd 100644 --- a/tranga-website/src/Components/Settings/Settings.tsx +++ b/tranga-website/src/Components/Settings/Settings.tsx @@ -38,8 +38,12 @@ export default function Settings({setApiUri} : {setApiUri: Dispatch) => { clearTimeout(timerRef.current); setApiUriColor("warning"); + + const val = e.target.value; + const value = val.endsWith("/") ? val.substring(0, val.length - 1) : val; + timerRef.current = setTimeout(() => { - setApiUri(e.target.value); + setApiUri(value); setApiUriColor("success"); }, 1000); }