Cleaner auth UI
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
loading = true;
|
||||
const { data, error } = await supabase.auth.signInWithPassword({
|
||||
email: fields.email,
|
||||
password: fields.password,
|
||||
password: fields.password
|
||||
});
|
||||
console.log('data', data);
|
||||
if (error) throw error;
|
||||
@@ -42,13 +42,7 @@
|
||||
<title>Welcome back to ClassroomIO</title>
|
||||
</svelte:head>
|
||||
|
||||
<AuthUI
|
||||
{supabase}
|
||||
isLogin={true}
|
||||
{handleSubmit}
|
||||
showOnlyContent={loading}
|
||||
bind:formRef
|
||||
>
|
||||
<AuthUI {supabase} isLogin={true} {handleSubmit} isLoading={loading} bind:formRef>
|
||||
<div class="mt-4 w-full">
|
||||
<p class="dark:text-white text-lg font-semibold mb-6">Welcome back</p>
|
||||
<TextField
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import {
|
||||
resetValidation,
|
||||
getConfirmPasswordError,
|
||||
getDisableSubmit,
|
||||
getDisableSubmit
|
||||
} from '$lib/utils/functions/validator';
|
||||
import { RESET_FIELDS } from '$lib/utils/constants/authentication';
|
||||
import AuthUI from '$lib/components/AuthUI/index.svelte';
|
||||
@@ -31,7 +31,7 @@
|
||||
try {
|
||||
loading = true;
|
||||
const { data, error } = await supabase.auth.update({
|
||||
password: fields.password,
|
||||
password: fields.password
|
||||
});
|
||||
console.log('data', data);
|
||||
if (error) throw error;
|
||||
@@ -59,6 +59,7 @@
|
||||
isLogin={false}
|
||||
{handleSubmit}
|
||||
showOnlyContent={true}
|
||||
isLoading={loading}
|
||||
showLogo={true}
|
||||
bind:formRef
|
||||
>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import {
|
||||
authValidation,
|
||||
getConfirmPasswordError,
|
||||
getDisableSubmit,
|
||||
getDisableSubmit
|
||||
} from '$lib/utils/functions/validator';
|
||||
import { SIGNUP_FIELDS } from '$lib/utils/constants/authentication';
|
||||
import AuthUI from '$lib/components/AuthUI/index.svelte';
|
||||
@@ -33,7 +33,7 @@
|
||||
loading = true;
|
||||
const { data, error } = await supabase.auth.signUp({
|
||||
email: fields.email,
|
||||
password: fields.password,
|
||||
password: fields.password
|
||||
});
|
||||
console.log('data', data);
|
||||
if (error) throw error;
|
||||
@@ -58,17 +58,9 @@
|
||||
<title>Join ClassroomIO</title>
|
||||
</svelte:head>
|
||||
|
||||
<AuthUI
|
||||
{supabase}
|
||||
isLogin={false}
|
||||
{handleSubmit}
|
||||
showOnlyContent={success}
|
||||
bind:formRef
|
||||
>
|
||||
<AuthUI {supabase} isLogin={false} {handleSubmit} isLoading={loading} bind:formRef>
|
||||
<div class="mt-4 w-full">
|
||||
<p class="dark:text-white text-lg font-semibold mb-6">
|
||||
Create a free account
|
||||
</p>
|
||||
<p class="dark:text-white text-lg font-semibold mb-6">Create a free account</p>
|
||||
<!-- <TextField
|
||||
label="Full Name"
|
||||
bind:value={fields.name}
|
||||
|
||||
Reference in New Issue
Block a user