diff --git a/templates/mellow-svelte/assets/js/pages/auth/login.svelte b/templates/mellow-svelte/assets/js/pages/auth/login.svelte index f04c442..5aa837b 100644 --- a/templates/mellow-svelte/assets/js/pages/auth/login.svelte +++ b/templates/mellow-svelte/assets/js/pages/auth/login.svelte @@ -12,12 +12,14 @@ rememberMe: false }) - $: disableLoginButton = () => { - if (!$form.email) return true - if (!$form.password) return true - if ($form.processing) return true + const isLoginButtonDisabled = (form) => { + if (!form.email) return true + if (!form.password) return true + if (form.processing) return true return false } + + $: disableLoginButton = isLoginButtonDisabled($form) @@ -53,11 +55,11 @@

Log into your account

Welcome back, please enter your details

- {#if $form.errors?.email || $form.errors?.login} + {#if $form.errors.email || $form.errors.login}

- {$form.errors?.login || $form.errors?.email} + {$form.errors.login || $form.errors.email}

{/if}