From fae1eee7fbee9b619549ebc2d19dd7b10d0e4247 Mon Sep 17 00:00:00 2001 From: Mickael Kerjean Date: Sat, 22 Jan 2022 23:30:02 +1100 Subject: [PATCH] lint (frontend): linting connection page --- client/pages/connectpage.js | 2 +- client/pages/connectpage/form.js | 36 ++++++++++++++++++++++---------- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/client/pages/connectpage.js b/client/pages/connectpage.js index 2d0f09f1..bfce8e7c 100644 --- a/client/pages/connectpage.js +++ b/client/pages/connectpage.js @@ -60,7 +60,7 @@ function ConnectPageComponent({ error, history }) { useEffect(() => { if (_GET["state"]) { // oauth2/oidc - const [type, next] = _GET["state"].split("::") + const [type, next] = _GET["state"].split("::"); authenticate({ ..._GET, next: next, diff --git a/client/pages/connectpage/form.js b/client/pages/connectpage/form.js index cae6f39e..fdec74d6 100644 --- a/client/pages/connectpage/form.js +++ b/client/pages/connectpage/form.js @@ -133,22 +133,36 @@ export function Form({ const auth = window.CONFIG["auth"].split(/\s*,\s*/); if (auth.indexOf(key) !== -1 || auth.indexOf(form[key].label.value) !== -1) { return hasUserInteracted === false && enabledBackends.length > 1 ? ( - ) : ( - onSubmit({ middleware: true, label: form[key].label.value })} /> - ) + onSubmit({ + middleware: true, + label: form[key].label.value, + })} /> + ); } return ( -
onSubmitForm(e)} autoComplete="off" autoCapitalize="off" - spellCheck="false" autoCorrect="off"> - + onSubmitForm(e)} + autoComplete="off" autoCapitalize="off" + spellCheck="false" autoCorrect="off"> +
@@ -165,9 +179,9 @@ function LoaderWithTimeout({ callback = nop, timeout = 0 }) { const t = setTimeout(() => callback(), timeout); return () => { clearTimeout(t); - } + }; }); return ( - ) + ); }