From 569bdb8c5d7538fa0ea8a99ff2f8376f7cbfa51a Mon Sep 17 00:00:00 2001 From: piotrruss Date: Mon, 6 Sep 2021 23:13:22 +0200 Subject: added stadard linter --- helpers/submitForm.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'helpers/submitForm.js') diff --git a/helpers/submitForm.js b/helpers/submitForm.js index 631c174..d67a7dc 100644 --- a/helpers/submitForm.js +++ b/helpers/submitForm.js @@ -5,9 +5,9 @@ const submitForm = async (e, url, mutateUser, setErrorMsg) => { const isRegister = url.includes('register') if ( - isRegister && e.currentTarget.password_confirm - && e.currentTarget.password_confirm.value - !== e.currentTarget.password.value + isRegister && e.currentTarget.password_confirm && + e.currentTarget.password_confirm.value !== + e.currentTarget.password.value ) { setErrorMsg('passwords_not_match') return @@ -19,13 +19,13 @@ const submitForm = async (e, url, mutateUser, setErrorMsg) => { email: e.currentTarget.email.value, password: e.currentTarget.password.value, ...(e.currentTarget.language - ? {language: e.currentTarget.language.value} + ? { language: e.currentTarget.language.value } : {} ), ...(e.currentTarget.theme - ? {theme: e.currentTarget.theme.value} + ? { theme: e.currentTarget.theme.value } : {} - ), + ) } try { @@ -33,7 +33,7 @@ const submitForm = async (e, url, mutateUser, setErrorMsg) => { await fetchJson(url, { method: 'POST', headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify(body), + body: JSON.stringify(body) }) ) } catch (err) { -- cgit v1.2.3